FluidNC icon indicating copy to clipboard operation
FluidNC copied to clipboard

VFD rework

Open atlaste opened this issue 1 year ago • 5 comments

Per request of @MitchBradley I did some rework on the VFD code. Basically I moved all the VFD specific code that can reside in a task to said task, removing the requirement for IRAM there. That should free up some RAM... This implementation should be backward compatible.

Needs more people testing this! I'm happy to test it out on my H2A VFD of course.

atlaste avatar Sep 19 '24 13:09 atlaste

It works on my Huanyang.

bdring avatar Sep 19 '24 16:09 bdring

@atlaste Did you test on the H2A VFD yet?

bdring avatar Sep 25 '24 18:09 bdring

@atlaste Did you test on the H2A VFD yet?

Not yet; I wanted to do some proper unit testing and crash testing first, so I ended up spending a few evenings writing test code for that. That test succeeded, which means that I'm fairly sure that the RS485 RX/TX traffic of the code is the same for the spindles that I've tested. The other test that I wanted to do is force a crash on the system, so we don't get into the IRAM mess again. I know how Mitch did that, so I'm going to hack something together in the code to mimick that behavior as well. I just haven't had time for that yet.

-- update.

The crash test fails. I'm not sure why, and it probably has nothing to do with the VFD changes. BUT: it's still important to figure this out. For reference: https://github.com/atlaste/FluidNC/blob/VFD_CrashTest/FluidNC/src/CrashTest.h with a little change in main.cpp to initialize it. Any move in RMT crashes the system.

atlaste avatar Sep 27 '24 18:09 atlaste

The H2A also works. Just need the crash test after the IRAM changes land, and then I'm confident it's fine to pull.

atlaste avatar Oct 05 '24 18:10 atlaste

Now that I know why my crash test crashed the CPU, I just moved the LD scripts back to DRAM to do the crash test. The VFD code itself wasn't the cause.

I haven't been able to crash the code ever since. I'm confident enough this works. Feel free to pull.

atlaste avatar Oct 05 '24 21:10 atlaste