Psi Swarm robot library version 0.9
Fork of PsiSwarmV9 by
Diff: sensors.cpp
- Revision:
- 20:2b6ebe60929d
- Parent:
- 18:9204f74069b4
diff -r 3e3b03d80ea3 -r 2b6ebe60929d sensors.cpp --- a/sensors.cpp Mon Jun 05 22:47:14 2017 +0000 +++ b/sensors.cpp Mon Jul 08 10:50:40 2019 +0000 @@ -33,7 +33,7 @@ void Sensors::enable_ultrasonic_ticker() { - ultrasonic_ticker.attach_us(this,&Sensors::update_ultrasonic_measure,100000); + ultrasonic_ticker.attach_us(callback(this, &Sensors::update_ultrasonic_measure), 100000); } void Sensors::disable_ultrasonic_ticker() @@ -51,7 +51,7 @@ command[1] = 0x51; // Get result is centimeters primary_i2c.write(ULTRASONIC_ADDRESS, command, 2); // Send the command to start a ranging burst } - ultrasonic_timeout.attach_us(this,&Sensors::IF_read_ultrasonic_measure,70000); + ultrasonic_timeout.attach_us(callback(this, &Sensors::IF_read_ultrasonic_measure), 70000); } else { psi.debug("WARNING: Ultrasonic sensor called too frequently.\n"); }