nanovna-v2 / NanoVNA2-firmware

Firmware for NanoVNA V2
https://nanorfe.com/nanovna-v2.html
217 stars 85 forks source link

Error in variable assignment #32

Closed nieldk closed 4 years ago

nieldk commented 4 years ago

With the latest pull, I get this error

main2.cpp: In function 'void adf4350_setup()':
main2.cpp:218:23: error: assignment of read-only variable 'mculib::ADF4350::ADF4350Driver<board::adf4350_sendWord_t>::cpCurrent'
  218 |  adf4350_rx.cpCurrent = 6;
main2.cpp:219:23: error: assignment of read-only variable 'mculib::ADF4350::ADF4350Driver<board::adf4350_sendWord_t>::cpCurrent'
  219 |  adf4350_tx.cpCurrent = 6;
nieldk commented 4 years ago

OK, so the issue is in mculib/include/mculib/adf4350.hpp

Line 28 
        static constexpr int cpCurrent = 15;

Needs to be
        int cpCurrent = 15;

And it compiles without errors

wutje commented 4 years ago

This has been fixed in the mculib.