-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems for ESP8266 and MCP2515 #3
Comments
That is because inaccurate definitions and since ESP8266 environment does not define min as arduinos (which is actually stupid). Change to code There is also other bug found on mcp_can, which prevent system sending anything. I'll try to fix it today. |
Now I updated both NMEA2000_mcp and mcp_can. |
Ok no more problems with min, but.... ( trying to compile the example battery monitor, Thank you very much. ) /Users/master/Documents/Arduino/libraries/NMEA2000_mcp/NMEA2000_mcp.cpp: In member function 'virtual bool tNMEA2000_mcp::CANSendFrame(long unsigned int, unsigned char, const unsigned char*, bool)': |
Hello,
when I try to compile for ESP8266 get
In file included from /Users/master/Documents/Arduino/libraries/NMEA2000/src/NMEA2000_CAN.h:144:0,
from /var/folders/p_/j24qpcws45d_0kzx14mtvdrm0000gn/T/arduino_modified_sketch_357838/BatteryMonitor.ino:15:
/Users/master/Documents/Arduino/libraries/NMEA2000_mcp/NMEA2000_mcp.h: In member function 'bool tNMEA2000_mcp::tFrameBuffer::AddFrame(long unsigned int, unsigned char, const unsigned char*) volatile':
/Users/master/Documents/Arduino/libraries/NMEA2000_mcp/NMEA2000_mcp.h:98:20: error: no matching function for call to 'min(unsigned char&, int)'
len=min(len,8);
^
/Users/master/Documents/Arduino/libraries/NMEA2000_mcp/NMEA2000_mcp.h:98:20: note: candidates are:
In file included from /Users/master/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62:0,
from /Users/master/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/Arduino.h:254,
from /var/folders/p_/j24qpcws45d_0kzx14mtvdrm0000gn/T/arduino_modified_sketch_357838/BatteryMonitor.ino:11:
/Users/master/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare _comp)
^
/Users/master/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:4226:5: note: template argument deduction/substitution failed:
In file included from /Users/master/Documents/Arduino/libraries/NMEA2000/src/NMEA2000_CAN.h:144:0,
from /var/folders/p/j24qpcws45d_0kzx14mtvdrm0000gn/T/arduino_modified_sketch_357838/BatteryMonitor.ino:15:
/Users/master/Documents/Arduino/libraries/NMEA2000_mcp/NMEA2000_mcp.h:98:20: note: mismatched types 'std::initializer_list<_Tp>' and 'unsigned char'
len=min(len,8);
^
The text was updated successfully, but these errors were encountered: