Mercurial > public > ostc4
diff Small_CPU/Src/scheduler.c @ 155:4fd8bbc7d841 FlipDisplay
Do hard sync after communication timeout > 1 second
author | Ideenmodellierer |
---|---|
date | Sun, 03 Mar 2019 17:46:50 +0100 |
parents | ee744c7160ce |
children | c659fda83e44 |
line wrap: on
line diff
--- a/Small_CPU/Src/scheduler.c Sun Mar 03 17:45:39 2019 +0100 +++ b/Small_CPU/Src/scheduler.c Sun Mar 03 17:46:50 2019 +0100 @@ -432,7 +432,7 @@ void schedule_check_resync(void) { - //TODO: REMOVE + /* counter is incremented in cyclic 100ms loop and reset to 0 if the transmission complete callback is called */ if((global.check_sync_not_running >= 3)) { // global.dataSendToSlaveIsNotValidCount = 0; @@ -444,6 +444,10 @@ */ SPI_Start_single_TxRx_with_Master(); } + if((global.check_sync_not_running == 10)) /* connection lost for about a second. Could be debugging or Firmware update */ + { + dohardspisync = 1; + } }