Open microbit-sam opened 4 years ago
@tangjie133 - Are you able to look at this issue?
@tangjie133 is this extension compatible with micro:bit V2?
Looking at the C++ code in https://github.com/DFRobot/pxt-DFRobot-NaturalScience/blob/master/ds18b20.cpp there is conditional code for V1 and V2, so it does look like it has been updated to run in V2. Could you confirm if that is the case?
Currently it is marked as V1-only inside MakeCode: https://github.com/microsoft/pxt-microbit/blob/v7.0.13/targetconfig.json#L268
So a user loading this extension on a micro:bit V2 would see only see the error code 927 (programme not compatible) and the programme won't run. If you can confirm the extension works for V2 we can update MakeCode so that it loads correctly in V2.
Hi @DFRobot,
As you might have seen from microsoft/pxt-microbit#3506 this extension is currently not compiling against the latest version of Micro:bit CODAL. This means it will not work with micro:bit V2.
Software for micro:bit V2 boards is built using CODAL rather than the DAL, and no longer includes the mbed layer. We’ve implemented the most frequently used mbed classes to support easy porting of existing extensions, but there may still be corner cases with this compatibility layer.
As your extension is currently not building, it will be disabled for micro:bit V2. People attempting to use your extension with a micro:bit V2 board will get error 929. This extension will only be re-enabled on micro:bit V2 once it is fixed.
There are details on how to ensure extensions work on both version of the micro:bit here (lancaster-university/codal-microbit-v2#31).
Looking at your extension source I believe that your extension falls under this category: