mirror of https://github.com/ArduPilot/ardupilot
Filter: fixed DerivativeFilter example build
This commit is contained in:
parent
d29b6ce0a8
commit
6534dab719
|
@ -35,7 +35,7 @@ mavlink_system_t mavlink_system;
|
|||
|
||||
FastSerialPort0(Serial); // FTDI/console
|
||||
|
||||
DerivativeFilter<float,float,7> derivative;
|
||||
DerivativeFilter<float,7> derivative;
|
||||
|
||||
// setup routine
|
||||
void setup()
|
||||
|
@ -58,7 +58,7 @@ void loop()
|
|||
delay(50);
|
||||
float t = millis()*1.0e-3;
|
||||
float s = sin(t);
|
||||
//s += noise();
|
||||
s += noise();
|
||||
uint32_t t1 = micros();
|
||||
float output = derivative.apply(s, t1) * 1.0e6;
|
||||
uint32_t t2 = micros();
|
||||
|
|
Loading…
Reference in New Issue