Exemplo n.º 1
0
void assertFail(char *exp, char *file, int line)
{
  storeAssertSnapshotData(file, line);

  ledClearAll();
  ledSet(ERR_LED1, 1);
  ledSet(ERR_LED2, 1);
  while (1);
}
Exemplo n.º 2
0
void assertFail(char *exp, char *file, int line)
{
  portDISABLE_INTERRUPTS();
  storeAssertSnapshotData(file, line);
  DEBUG_PRINT("Assert failed %s:%d\n", file, line);

  motorsSetRatio(MOTOR_M1, 0);
  motorsSetRatio(MOTOR_M2, 0);
  motorsSetRatio(MOTOR_M3, 0);
  motorsSetRatio(MOTOR_M4, 0);

  ledClearAll();
  ledSet(ERR_LED1, 1);
  ledSet(ERR_LED2, 1);

  while (1);
}