Comments (9)
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.
Note that I have tried this with VSCode+PlatformIO and Arduino 1.8.6 both give same errors
from dcs-bios-arduino-library.
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.
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:
^~~~
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.
I really appreciate your help on this
from dcs-bios-arduino-library.
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.
Been awhile on this issue so checking in to see if there's been any progress on this?
from dcs-bios-arduino-library.
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.
@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.
Partially, Slave seems to be working. master is a little more work.
from dcs-bios-arduino-library.
Related Issues (20)
- Dual concentric rotary encoder emulation feature? HOT 2
- Lack of documentation about library itself... HOT 3
- sendDcsBiosMessage sends only boolean values. HOT 3
- Can we get DCS BIOS RS485 going on STM Blue Pills - both master and slave? HOT 4
- Mega2560 as DCS BIOS slave - how to define which UART the MAX487 chip is on.
- Matrix2pos fuction guide
- AH-64D Fire panel Cover HOT 2
- Arduino Nano Every requires workaround HOT 3
- Q (bug?): Garbled data on complex sketches - (concurrency?) isssue in DcsBiosNgRS485Slave.cpp.inc HOT 2
- Polling Issue when using latest version of DCS-BIOS v0.3.8 HOT 6
- RS485 with Interrupts
- STM32duino support with RS485
- Bounty: RS485 support on STM32 with the official STM32duino core HOT 1
- MatrixSwitches.h should either be bracketed by #ifdef block in the DcsBios.h, or included by default HOT 1
- TACAN mode selector switch - possible problems with 'new' DCS Dios script HOT 10
- Latest DCS Bios library "servo.h" library incompatible with ESP32 boards HOT 2
- Release to PlatformIO registry
- Syncronization HOT 6
- SwitchMultiPos not correctly accounting for PIN_NC and instead sends the PIN_NC value HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcs-bios-arduino-library.