mirror of https://github.com/ArduPilot/ardupilot
Filter: use millis/micros/panic functions
This commit is contained in:
parent
578b31e7f8
commit
51a6455ac0
|
@ -22,10 +22,10 @@ static float noise(void)
|
|||
void loop()
|
||||
{
|
||||
hal.scheduler->delay(50);
|
||||
float t = hal.scheduler->millis()*1.0e-3f;
|
||||
float t = AP_HAL::millis()*1.0e-3f;
|
||||
float s = sinf(t);
|
||||
//s += noise();
|
||||
uint32_t t1 = hal.scheduler->micros();
|
||||
uint32_t t1 = AP_HAL::micros();
|
||||
derivative.update(s, t1);
|
||||
float output = derivative.slope() * 1.0e6f;
|
||||
hal.console->printf("%f %f %f %f\n", t, output, s, cosf(t));
|
||||
|
|
Loading…
Reference in New Issue