Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add esomx, trackerm, p2 + eliminate duplicated data so new hardware platforms can easily be added #13

Merged

Conversation

joegoggins
Copy link
Contributor

@joegoggins joegoggins commented Jun 2, 2022

Overview

Adds support for esomx and trackerm platforms. Also adjusts code so that future hardware platforms will not require custom modifications, but rather, just a simple update of @particle/device-constants version and a re-release.

The approach to eliminating duplicated hardware platform tags metadata was to depend on device-constants features data directly and transforming the data slightly to comply with the internal data structures in platform.js.

See sc-98440 for more details.

How to test?

Observe the new unit tests that cover the expected tags for each platform. Some of these tags are used in DVOS integration tests here: https://github.com/particle-iot/device-os/tree/develop/user/tests/integration

  1. git checkout sc-98440/make-platforms-depend-on-device-constants
  2. npm i
  3. npm test

Observe that esomx, trackerm, and p2 args can be passed to a build command like this: (you'll need to modify the args to match actual location of device-os on your machine)

node ./lib/index.js --test-dir /Users/jgoggins/git/particle/firmware-private/user/tests/integration/communication/events/ --device-os-dir /Users/jgoggins/git/particle/firmware-private build esomx -v

This command should fail in way that clearly illustrates that the esomx arg was accepted and that the make system of device-os got executed. Instead of Error: Unrecognized filtering option: bonk, you should see something like this:

Error: `make` failed with the exit code 2:

Joe Goggins added 2 commits June 2, 2022 18:14
When eliminating hard-coded tags and using device-constant platform features instead,
the following changes we're observed

p2: has "som" tag, when it shouldn't, eliminated.
tracker: had "gps" before, now has "gnss", no integration tests use this so no breaking changes
b5som,bsom,boron,argon: all now also have "mesh" tag
@joegoggins joegoggins force-pushed the sc-98440/make-platforms-depend-on-device-constants branch from 0e2c085 to 55b7eb5 Compare June 3, 2022 17:07
@joegoggins joegoggins marked this pull request as ready for review June 3, 2022 17:44
@joegoggins joegoggins requested review from sergeuz and busticated June 3, 2022 17:44
@joegoggins joegoggins changed the title Sc 98440/make platforms depend on device constants Add esomx, trackerm, p2 + eliminate duplicated data so new hardware platforms can easily be added Jun 3, 2022
Copy link
Member

@sergeuz sergeuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Copy link

@busticated busticated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🙌 👍

@joegoggins joegoggins merged commit 5700460 into master Jun 6, 2022
@joegoggins joegoggins deleted the sc-98440/make-platforms-depend-on-device-constants branch June 6, 2022 16:53
@joegoggins
Copy link
Contributor Author

Thanks for the reviews folks. Now that this is merged, I'm going to do a bit of tidying up to eliminate the 3 WIP PRs on this project via sc-104576 and then (after PR reviews/updates/merging) will cut 0.5.0.

Sergey and I synced about this gameplan privately last week, but figured I'd drop it here in case Mirande wants to chime in/make recommendations/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants