C++ Library for the PsiSwarm Robot - Version 0.8
Dependents: PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk
Fork of PsiSwarmV7_CPP by
Diff: dances.cpp
- Revision:
- 11:312663037b8c
- Parent:
- 9:dde9e21030eb
diff -r e58323951c08 -r 312663037b8c dances.cpp --- a/dances.cpp Sun Oct 16 16:00:20 2016 +0000 +++ b/dances.cpp Sun Oct 16 21:06:15 2016 +0000 @@ -15,7 +15,7 @@ * (C) Dept. Electronics & Computer Science, University of York * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis * - * PsiSwarm Library Version: 0.7 + * PsiSwarm Library Version: 0.8 * * October 2016 * @@ -28,8 +28,8 @@ char vibrate_counter = 0; Timeout dances_timeout; -///Do a simple wiggle -void vibrate(void) +//Do a simple wiggle +void Dances::vibrate(void) { if(vibrate_counter == 0)led.save_led_states(); if(vibrate_counter % 2 == 0) { @@ -45,7 +45,7 @@ float wiggle_timeout_period = 0.06; //Move less on first 'wiggle' so that we stay in roughly the same place! if(vibrate_counter == 0) wiggle_timeout_period = 0.03; - dances_timeout.attach(vibrate, wiggle_timeout_period); + dances_timeout.attach(this, &Dances::vibrate, wiggle_timeout_period); } else { vibrate_counter = 0; motors.brake();