Movesense rescheduleTimer

30 views Asked by At

There is a rescheduleTimer() in the movesense_device_lib. None of the example projects using it as I can see.

startTimer() and stopTimer() is working as expected but rescheduleTimer() always return false and the timer is not rescheduled.

Anybody else tried this function with success?

Before asking the question I checked:

  • mTimer != wb::ID_INVALID_TIMER
  • mTimer is a valid running timer ID
  • I tried both ResourceClient::rescheduleTimer() and ResourceProvider::rescheduleTimer()
1

There are 1 answers

2
PetriL On BEST ANSWER

You'll get false from rescheduleTimer if:

  • There are no more free timers in the TimerPool
  • timerId is not an existing timer
  • timer is not continuous (second parameter was false in startTimer call)
  • you try to reschedule a timer owned by some other class

Full Disclosure: I work for the Movesense Team