Updates Modules JS thoughts #6874
Replies: 1 comment
-
Posted at 2024-06-17 by @gfwilliams 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 I'll just comment on the other stuff in the original thread... https://forum.espruino.com/conversations/393880/#comment17413828 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-06-15 by user156811
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.
@gfwilliams
Beta Was this translation helpful? Give feedback.
All reactions