OpenAstroTech / OATFWGUI

OpenAstroTech FirmWare Graphical User Interface
http://openastrotech.com/
8 stars 0 forks source link

Using 8 microsteps for RA/DEC leads to compilation failure #47

Closed OriginaldCrypt closed 4 months ago

OriginaldCrypt commented 4 months ago

[Probably a FW bug, not a GUI bug, I can't confirm]

Default microsteps for RA/DEC in OAT Firmware Configuration web V2.15 is 8.

// Unique ConfigKey: TR:OAT,FWT:L,SL:N,HS:N,BD:M21,RST:N9,RDO:TU,RATP1500:O90:A3000:V1800:S8:T256:,RTR:N,RT:1,DS:N9,DDT:TU,DATP1500:O90:A3000:V1800:S8:T256:,DT:1,DLIN90:D45:,STL:N,DY:LCD,GP:Y,LM:N,FC:N,APT:N,RAH:Y,RAHAP53:S10:

Compilation fails with this default setup. But it works changing it to 16.

2024-03-02 09:10:21,039:ERROR:In file included from .pio\libdeps\mksgenlv21\InterruptStepper\include/Stepper.h:25:0, 
2024-03-02 09:10:21,039:ERROR:                 from src\StepperConfiguration.hpp:13, 
                 from src\Mount.hpp:11, 
                 from src\HallSensorHoming.hpp:5, 
                 from src\Mount.cpp:5: 
.pio\libdeps\mksgenlv21\InterruptStepper\include/AccelerationRamp.h: In instantiation of 'class AccelerationRamp<256, 16000000, 314, 314>': 
.pio\libdeps\mksgenlv21\InterruptStepper\include/Stepper.h:306:65:   required from 'static uint32_t Stepper<INTERRUPT, DRIVER, RAMP>::distanceToGo() [with INTERRUPT = IntervalInterrupt<(Timer)4>; DRIVER = Driver<Pin<60>, Pin<61> >; RAMP = AccelerationRamp<256, 16000000, 314, 314>; uint32_t = long unsigned int]' 
src\InterruptAccelStepper.h:89:37:   required from 'uint32_t InterruptAccelStepper<STEPPER>::distanceToGo() [with STEPPER = Stepper<IntervalInterrupt<(Timer)4>, Driver<Pin<60>, Pin<61> >, AccelerationRamp<256, 16000000, 314, 314> >; uint32_t = long unsigned int]' 
src\Mount.cpp:1428:66:   required from here 
.pio\libdeps\mksgenlv21\InterruptStepper\include/AccelerationRamp.h:91:5: error: static assertion failed: Amount of steps per stair has to be at most 128 
     static_assert(STEPS_PER_STAIR <= 128, "Amount of steps per stair has to be at most 128"); 
     ^~~~~~~~~~~~~ 
.pio\libdeps\mksgenlv21\InterruptStepper\include/AccelerationRamp.h:92:5: error: static assertion failed: Amount of steps per stair has to be power of 2 
     static_assert(is_pow2(STEPS_PER_STAIR), "Amount of steps per stair has to be power of 2"); 
     ^~~~~~~~~~~~~ 
julianneswinoga commented 4 months ago

This isn't really a firmware bug or a bug with OATFWGUI, but if the default config the web configurator outputs doesn't compile that's a problem. Can you re-open this in the https://github.com/OpenAstroTech/OpenAstroTracker-Firmware-Config-Web repository?