-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Comments
I must specify this is not a Serial command, its 3 network packets qwq |
the command stuff was to simplify explaining things, im sorry |
updated how the array would actually work ;-; |
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... |
like this one? #241 |
We can integrate that into the code, I guess. I'm currently refactoring the network code, which is pretty bad right now :D |
no |
First is getting tracker features, this command should provide features by following this new type:
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:RUNTIME_MAG_SUPPORT
MAG_ENABLED
CALIBRATION_SUPPORT
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 likeTRIGGER 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
The text was updated successfully, but these errors were encountered: