Sbus probl

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Sbus probl

Post by Gimbal »

Made some mod in Rx to check Sbus stop byte:

Code: Select all

/**************************************************************************************/
/***************                   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 ?

Anders

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Sbus probl

Post by Gimbal »

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

Anders

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Sbus probl

Post by Gimbal »

This is definitely an timing issue, if i set to fixed cycle time 9000 in config.h i get an significant improvement, hm maybe i better move to 32 bit ?

Post Reply