Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Firmware] Make it work with newer Arduino versions.

  • Loading branch information...
commit 601c02507138e68a4576addb79810c925b5f5290 1 parent cac98ac
@lpereira authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 Firmware/Firmware.pde
View
14 Firmware/Firmware.pde
@@ -88,7 +88,7 @@ class MotorController; /* Controlador de Motor */
class PIDWController; /* Controlador PID */
/* Definição para o callback de tarefa */
-typedef void (*TaskCallback)(TaskManager &);
+typedef void (*TaskCallback)();
/****************************************************************************************************************/
/** Classes *****************************************************************************************************/
@@ -143,8 +143,8 @@ private:
/**
* Executa uma iteração da tarefa.
*/
- void inline run(TaskManager &tm) {
- m_callback(tm);
+ void inline run() {
+ m_callback();
}
public:
@@ -237,7 +237,7 @@ public:
task = &m_tasks[n_task];
if (task->decrementCountdownBy(elapsedTime) <= 0) {
- task->run(*this);
+ task->run();
task->resetCountdown();
}
}
@@ -735,7 +735,7 @@ StatusLED status(STATUS_LED_GREEN, STATUS_LED_RED);
* Tarefa de Equilíbrio
* Responsável por manter o robô equilibrado.
*/
-void balance_task(TaskManager &tm)
+void balance_task()
{
double torque; /* Torque a ser aplicado nos motores */
int torqueLeft, torqueRight;
@@ -772,7 +772,7 @@ void balance_task(TaskManager &tm)
* Tarefa de leitura do Joystick
* Responsável por obter o estado atual do joystick, e entrar no modo de configuração.
*/
-void joystick_poll_task(TaskManager &tm)
+void joystick_poll_task()
{
/* Pede ao joystick que envie novo estado */
joystick.update();
@@ -789,7 +789,7 @@ void joystick_poll_task(TaskManager &tm)
/**
* Tarefa de controle do LED.
*/
-void blink_status_task(TaskManager &tm)
+void blink_status_task()
{
static char led_status = false;
Please sign in to comment.
Something went wrong with that request. Please try again.