/**************************************************************************************/ /*************** SBUS RX Data ********************/ /**************************************************************************************/ #if defined(SBUS) void readSBus(){ #define SBUS_SYNCBYTE 0x0F // Not 100% sure: at the beginning of coding it was 0xF0 !!! static uint16_t sbus[25]={0}; while(SerialAvailable(1)){ int val = SerialRead(1); if(sbusIndex==0 && val != SBUS_SYNCBYTE) continue; sbus[sbusIndex++] = val; if(sbusIndex==25){ sbusIndex=0; if (sbus[24] == 0x0){
This work's with older code 2.1, but with later code it seams that i get buffer overrun, is there a way to put readsbus in mainloop ?
hm interesting, am i the only one with Sbus on this community ?, It's run ok with 2.1 and it feel's like the problem started with acrotrainer/horizon mode and it's timing related, would like to use these futures and do so with sbus