Author Topic: SBUS Library for Arduino not compiling  (Read 58 times)

mbuitrago

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
SBUS Library for Arduino not compiling
« on: October 11, 2017, 11:56:33 AM »
Newbie here...I use a custom "SBUS" library on my Arduino boards which sends out servo commands through the UART pin that I assume now needs to be ported to RFduino.
When I try to compile I get below error. I assume its on the implementation of the 8E2 inverted logic...?

How hard is it to solve this or make it work? If someone could fix it for me that would be much appreciated. I've attached the library files (Code)
I've been reading on some Teensy forums that people are making it work in relation to the same or similar issues with 8E2 in the code.

Thanks in advance.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\Program Files (x86)\Arduino\libraries\BMC_SBUS_RfDuino\BMC_SBUS_RF.cpp: In member function 'void BMC_SBUS::begin()':

C:\Program Files (x86)\Arduino\libraries\BMC_SBUS_RfDuino\BMC_SBUS_RF.cpp:36:30: error: 'SERIAL_8E2' was not declared in this scope

   SERIALPORT.begin(BAUDRATE, SERIAL_8E2);

                              ^

exit status 1
Error compiling for board RFduino

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

tolson

  • Global Moderator
  • *****
  • Posts: 859
  • Karma: +20/-0
    • View Profile
    • Thomas Olson Consulting
Re: SBUS Library for Arduino not compiling
« Reply #1 on: October 11, 2017, 03:03:14 PM »
The nRF51 hardware UART only supports 1 stop bit.

mbuitrago

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: SBUS Library for Arduino not compiling
« Reply #2 on: October 11, 2017, 03:32:18 PM »
Thank you, I see. is there a way to modify my code to use 8E1 then? not sure if I'm asking the right question but meaning can I possibly make it work on the code end somehow?
Anyone here ever work with the SBUS protocol on this platform?

Thanks

tolson

  • Global Moderator
  • *****
  • Posts: 859
  • Karma: +20/-0
    • View Profile
    • Thomas Olson Consulting
Re: SBUS Library for Arduino not compiling
« Reply #3 on: October 11, 2017, 06:15:39 PM »
First thing is just remove the flag in the library and see what you get.

  SERIALPORT.begin(BAUDRATE);

mbuitrago

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: SBUS Library for Arduino not compiling
« Reply #4 on: October 11, 2017, 06:34:39 PM »
Compiled fine that way, did not upload to board yet. Does that tell us anything. At least that there are no further code issues I assume. :)


 

anything