Git Product home page Git Product logo

Comments (9)

AerialElectron avatar AerialElectron commented on August 18, 2024 1

Correct, that fall through is intentional. That particular message is only a warning, so it shouldn't be an issue, but I've corrected it now.
As for the master version: I'll look into it. Theoretically, it should be possible, but I'm learning this codebase on the fly.

from dcs-bios-arduino-library.

kbastronomics avatar kbastronomics commented on August 18, 2024

Note that I have tried this with VSCode+PlatformIO and Arduino 1.8.6 both give same errors

from dcs-bios-arduino-library.

AerialElectron avatar AerialElectron commented on August 18, 2024

If you're comfortable with it, please try giving the "32U4_Support" branch of my fork a try. If that works I will submit the pull request for this repo. You will also need to add a #define UART1_SELECT to your script and remove the #define DCS_BIOS_DEFAULT_SERIAL when you are using RS485. I don't have the hardware to test this out on a live RS485 network, but it does appear to compile correctly now.
For reference: the root of this issue appears to be that the 32U4 indexes its UART port off of 1 instead of zero. UART0 does not exist, UART1 does. I don't have a deep enough understanding of the RS485 code to comment on any further effects that this might have outside of RS485, but my current implementation essentially just tells BIOS to pretend that it is an ATmega2560 instead of a 32U4 for the purposes of communication. @talbotmcinnis may have a clearer knowledge of what that portion of the code is actually doing.

from dcs-bios-arduino-library.

kbastronomics avatar kbastronomics commented on August 18, 2024

Happy to try.
It did compile the slave code see attcahed for one message in it

C:\Users\smgvb\Documents\Arduino\libraries\dcs-bios-arduino-library-32U4_Support\src/internal/DcsBiosNgRS485Slave.cpp.inc: In member function 'void DcsBios::RS485Slave::rxISR()':
C:\Users\smgvb\Documents\Arduino\libraries\dcs-bios-arduino-library-32U4_Support\src/internal/DcsBiosNgRS485Slave.cpp.inc:79:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
      state = RX_WAIT_ADDRESS;
      ~~~~~~^~~~~~~~~~~~~~~~~
C:\Users\smgvb\Documents\Arduino\libraries\dcs-bios-arduino-library-32U4_Support\src/internal/DcsBiosNgRS485Slave.cpp.inc:83:4: note: here
    case RX_WAIT_ADDRESS:
    ^~~~

log.txt

It does not compile the RS485 Master code though for me (not sure if you address master or not)
here's the log from that compile.

RS485Master_log.txt

I really appreciate your help on this

from dcs-bios-arduino-library.

kbastronomics avatar kbastronomics commented on August 18, 2024

I looked at the code around that point and it seems to be expected to fall thru, refering to this

C:\Users\smgvb\Documents\Arduino\libraries\dcs-bios-arduino-library-32U4_Support\src/internal/DcsBiosNgRS485Slave.cpp.inc:79:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
      state = RX_WAIT_ADDRESS;

from dcs-bios-arduino-library.

kbastronomics avatar kbastronomics commented on August 18, 2024

Been awhile on this issue so checking in to see if there's been any progress on this?

from dcs-bios-arduino-library.

kbastronomics avatar kbastronomics commented on August 18, 2024

Kind of gave up on this ask, I've gotten it compiling now on the Pro-Micro in both Master/Slave modes, really does come down to the 32U4 has no UART0 that's reserved for the CDC USB port, so UART1 is the first UART available. my current code is still untested and have to check the UART BAUD settings. I'll eventually do a PR once fully tested for it to incorporate if desired.

oh and also believe I got IRQ working, also to be tested

from dcs-bios-arduino-library.

ltshifty avatar ltshifty commented on August 18, 2024

@kbastronomics Did you ever get this working?

I made the mistake of buying ATMEGA32U4 Pro Micro's instead of Nano's, and rather than let them go to waste I'm hoping you've solved this issue.

from dcs-bios-arduino-library.

kbastronomics avatar kbastronomics commented on August 18, 2024

Partially, Slave seems to be working. master is a little more work.

from dcs-bios-arduino-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.