samples: canbus: canopen: reduce default timeout in main thread

Reduce the default timeout in the CANopen sample from 50 milliseconds
to 1 millisecond. This vastly improves performance of the sample and
matches the example code present in the CANopenNode stack.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2020-02-04 15:23:06 +01:00 committed by Maureen Helm
parent 6b702888e5
commit 6881da0afa

View file

@ -249,7 +249,7 @@ void main(void)
CO_CANsetNormalMode(CO->CANmodule[0]);
while (true) {
timeout = 50U; /* default timeout in milliseconds */
timeout = 1U; /* default timeout in milliseconds */
timestamp = k_uptime_get();
reset = CO_process(CO, (uint16_t)elapsed, &timeout);