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

Two commands for enabling features #254

Open
ImUrX opened this issue Jun 29, 2023 · 8 comments
Open

Two commands for enabling features #254

ImUrX opened this issue Jun 29, 2023 · 8 comments
Assignees
Labels
Area: Hardware Protocol Related to communication with hardware/software trackers Type: Discussion Further information is requested Type: Enhancement Adds or improves a feature

Comments

@ImUrX
Copy link
Member

ImUrX commented Jun 29, 2023

First is getting tracker features, this command should provide features by following this new type:

u8[u32]

u8 specifying the length of the array and then the amount of u32s :p

The features are done via bitfields so each bit of the u32 numbers means something, for now we will be using little endian for processing the data but its gonna be shown in the actual network packet as big endian but the spec would specify what each bit is so we are gonna use indexing for defining fields:

  1. RUNTIME_MAG_SUPPORT
  2. MAG_ENABLED
  3. CALIBRATION_SUPPORT
  4. BLINK_SUPPORT

So first bit (depends of endianness) tells you if the tracker itself has support for runtime magnetometer management #230 and second bit lets you know if it's enabled or disabled.

Second command is tracker trigger, this let's you trigger commands based on the previous feature, it has two arguments which the first one is based on u16 (which is bigger than 256*32) and second one should only be a boolean for setting stuff to one or zero but we could flex this dependent to the first argument (needs to be discussed).
The first argument should refer to one of the index of tracker features (needs to be discussed) and it triggers that feature so you do TRIGGER 3 and then tracker should blink. But this doesn't mean every feature triggers stuff like TRIGGER 0 should do nothing.
TRIGGER 1 true should set MAG_ENABLED to true and vice versa.

This is a very flexible idea and shouldnt be that complicated to implement

@ImUrX ImUrX added Type: Enhancement Adds or improves a feature Area: Hardware Protocol Related to communication with hardware/software trackers labels Jun 29, 2023
@ImUrX ImUrX added the Type: Discussion Further information is requested label Jun 29, 2023
@ImUrX
Copy link
Member Author

ImUrX commented Jun 29, 2023

I must specify this is not a Serial command, its 3 network packets qwq

@ImUrX
Copy link
Member Author

ImUrX commented Jun 29, 2023

the command stuff was to simplify explaining things, im sorry

@ImUrX
Copy link
Member Author

ImUrX commented Jun 29, 2023

updated how the array would actually work ;-;

@TheDevMinerTV
Copy link
Member

TheDevMinerTV commented Jun 30, 2023

I've started working on this in impl/feature-retrieval.

@Eirenliel
Copy link
Member

I've started working on this in impl/feature-retrieval.

istg someone already did it for some feature, but i can't find which PR it's in...

@nekomona
Copy link
Contributor

istg someone already did it for some feature, but i can't find which PR it's in...

like this one? #241

@TheDevMinerTV
Copy link
Member

TheDevMinerTV commented Jun 30, 2023

We can integrate that into the code, I guess.

I'm currently refactoring the network code, which is pretty bad right now :D

@Eirenliel
Copy link
Member

istg someone already did it for some feature, but i can't find which PR it's in...

like this one? #241

no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Hardware Protocol Related to communication with hardware/software trackers Type: Discussion Further information is requested Type: Enhancement Adds or improves a feature
Projects
None yet
Development

No branches or pull requests

4 participants