Updates Modules JS thoughts

Posted on
  • Build changes

    Small change. I thought in the boards file BANGLEJS should be in the libraries section. Then in the Makefile you can easily do a IF USE_BANGLEJS you can add all the needed WRAPPERSOURCES and SOURCES files. change in makefile

    The alternative

    The alternative to this would be to look for the define -DBANGLEJS_DEVICENAME. If there then you add add all the supporting bangleJS files. My original thought was to look for -DBANGLEJS, but for some reason the original bangle watch doesn't have that.

    Potential thoughts forward

    We had previously talked just moving one hardware driver at a time to slowly migrate the code base. So i first did the backlight and display driver because i thought they would move the most code out of the main file. Which it did, but I'm thinking maybe the best route forward would be to choice the least critical and used device. So for the first device take the barometer. Something that's only used on a subsection of devices and in most cases just a nice to have. If its not received well, then its easy to migrate back.

    @Gordon

  • So it's the changes here? https://github.com/brendena/Espruino/blob/babd6246cd13710bc7bd43a98917d3eecb8a9755/Makefile#L409-L419

    Is the idea that we are going to have a bunch of lines in the BOARD.py file for each of the sensors/etc that are implemented? Or is the idea that they'll get included via the Makefile and you won't have to specify what files you want?

    If it's the first, maybe for now we can just keep several 'WRAPPERSOURCES += ... lines in the BOARD.py file like we used to do? It's not like there are hundreds of devices implementing Bangle.js stuff at the moment, and it's nice to be able to see at a glance which files are actually included.

    I'll just comment on the other stuff in the original thread... https://forum.espruino.com/conversations/393880/#comment17413828

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Updates Modules JS thoughts

Posted by Avatar for user156811 @user156811

Actions