lancaster-university / codal-microbit-v2

CODAL target for the micro:bit v2.x series of devices
MIT License
41 stars 50 forks source link

Implement microbit_dal_version() and set MICROBIT_DAL_VERSION. #413

Open microbit-carlos opened 3 months ago

microbit-carlos commented 3 months ago

To properly get the CODAL version this PR also needs:

Without that PR it should still work, but the version will still be set to "unknown".

int main() {
    uBit.init();

    uBit.serial.printf("CODAL_VERSION: %s\n", CODAL_VERSION);
    uBit.serial.printf("CODAL_VERSION_LONG: %s\n", CODAL_VERSION_LONG);
    uBit.serial.printf("DEVICE_DAL_VERSION: %s\n", DEVICE_DAL_VERSION);
    uBit.serial.printf("MICROBIT_DAL_VERSION: %s\n", MICROBIT_DAL_VERSION);
    uBit.serial.printf("microbit_dal_version(): %s\n", microbit_dal_version());
    uBit.serial.printf("uBit.getVersion(): %s\n", uBit.getVersion());

    while (true);
}
github-actions[bot] commented 3 months ago

Build diff

Base commit: 08ba1e75fa86b2f4807a87e6b555e0efb1e712a8 Action run: https://github.com/lancaster-university/codal-microbit-v2/actions/runs/8238344507

     VM SIZE    
 -------------- 
  [ = ]       0    TOTAL
microbit-carlos commented 2 months ago

Once this comment has been implemented in to PR https://github.com/lancaster-university/codal-core/pull/169, then this PR should be ready to be merged as it is (assuming codal_version.h is include in CodalConfig.h).