You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • How would you feel about moving the true pure javascript stuff out...

    You mean the JSON comments that describe what's in Bangle.js? Well, for every other bit of Espruino we have jswrap_X.c files that contain the JSON descriptions of the methods/fields of X.

    So I feel like in a way it'd be a shame to change that.

    I guess I think the file's pretty much always going to be so big you need to use your code editor's search and Ctrl-click functionality to jump to declarations, so I'm not really sure if that has a huge benefit?

    But yes, I think we're basically on the same page - I'd like jswrap_bangle to be tidier, but to implement the code that implements the functionality of the Bangle object. Then when stuff can be pulled out without duplicating code we could do that.

    IMO even keeping as-is and splitting the drivers for various bits of hardware (like accelerometer/pressure/etc) into their own files would be a big benefit.

    Ideally just specifying an accelerometer type in BOARD.py would be enough to compile in the relevant driver.c file and use it, but that feels a way off!

About

Avatar for Gordon @Gordon started