mysensors / NodeManager

Plugin for a rapid development of battery-powered sensors
132 stars 82 forks source link

Compilation error on STM32F103C8 #474

Closed user2684 closed 4 years ago

user2684 commented 5 years ago

Ref: https://forum.mysensors.org/topic/10169/compile-nodemanager-for-stm32f103c8-but-i-get-error

In file included from C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\libraries\MySensors_NodeManager1.9/MySensors_NodeManager.h:91:0,

                 from C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\MyS_NM_GW_STM32F103_RS485-test\MyS_NM_GW_STM32F103_RS485-test.ino:177:

C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\libraries\MySensors_NodeManager1.9/nodemanager/Timer.cpp: In member function 'bool Timer::isOver()':

C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\libraries\MySensors_NodeManager1.9/nodemanager/Timer.cpp:82:15: error: 'DO_NOT_REPORT' was not declared in this scope

  if (_mode == DO_NOT_REPORT || _mode == NOT_CONFIGURED) return false;

               ^

C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\libraries\MySensors_NodeManager1.9/nodemanager/Timer.cpp:82:41: error: 'NOT_CONFIGURED' was not declared in this scope

  if (_mode == DO_NOT_REPORT || _mode == NOT_CONFIGURED) return false;

                                         ^

C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\libraries\MySensors_NodeManager1.9/nodemanager/Timer.cpp:84:15: error: 'IMMEDIATELY' was not declared in this scope

  if (_mode == IMMEDIATELY) return true;

               ^

C:\Users\adampr\Documents\arduino-1.8.8\Portable\sketchbook\libraries\MySensors_NodeManager1.9/nodemanager/Timer.cpp:111:15: error: 'TIME_INTERVAL' was not declared in this scope

  if (_mode == TIME_INTERVAL) {

               ^ 
user2684 commented 5 years ago

Due to maple library (STM32duino) use keyword "Timer" and that provide conflict with "Timer" from NodeManager

user2684 commented 4 years ago

Fixed by #512 renaming the Timer class to InternalTimer to avoid any conflict