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

Short Range High Accuracy Mode Functionality #6

Open
Bag132 opened this issue Aug 10, 2023 · 10 comments · May be fixed by #7
Open

Short Range High Accuracy Mode Functionality #6

Bag132 opened this issue Aug 10, 2023 · 10 comments · May be fixed by #7

Comments

@Bag132
Copy link

Bag132 commented Aug 10, 2023

There doesn't seem to be any short-range mode functionality yet it'd be cool to have.

@Bag132
Copy link
Author

Bag132 commented Aug 10, 2023

I can make a PR with the feature. I know the innards of this library were downloaded from the AMS website though so if they update the library it'll be a little harder to merge into this repo but yeah.

@PaulZC
Copy link
Contributor

PaulZC commented Aug 11, 2023

Hi Victor (@Bag132 ),

Sure, a Pull Request would be great - thank you.

Best wishes,
Paul

@Bag132
Copy link
Author

Bag132 commented Aug 11, 2023

I have setRange and getRange functions working.
However, the image in tof_bin_image.c is outdated in this repository. To get the functions working I had to update the library with the new firmware version I found at https://ams.com/en/tmf8821#tab/tools under the TMF882x_Driver_SDK_Source_v1.19.zip download.
Should I include the new firmware image in my PR, or should someone else merge it in at another time? @PaulZC

@PaulZC
Copy link
Contributor

PaulZC commented Aug 12, 2023

Hi Victor,
Please include the updated library in the PR. We can diff it to make sure you haven't changed anything! ;-)
Best,
Paul

@Bag132
Copy link
Author

Bag132 commented Aug 16, 2023

PR is posted

@PaulZC
Copy link
Contributor

PaulZC commented Aug 16, 2023

Thank you Victor,

Have you finished making changes?

Best,
Paul

@Bag132
Copy link
Author

Bag132 commented Aug 16, 2023

Yeah, at first it was going to be controlled by using an enum but since the TMF882X SDK short-range functions use bool that meant all returns from the functions were going to be binary and you wouldn't be able to interpret a 0x00 from ACTIVE_RANGE vs an I2C error solely based on the return from tmf882x_mode_app_is_shortrange_mode. But yeah I'm done with it.

@PaulZC
Copy link
Contributor

PaulZC commented Aug 16, 2023

OK - thanks!
It may take us a little while to merge and test this, but we will get to it.
Thanks again,
Paul

@Bag132
Copy link
Author

Bag132 commented Aug 16, 2023

Yeah happy to contribute.
Also, the entire underlying TMF882X SDK has been updated. I had an original version of the functions but I later found out that ams had already added tmf882x_mode_app_is_shortrange_mode and tmf882x_mode_app_set_shortrange_mode so I just copied them and pasted over mine.

The new functionality in the updated SDK includes get/set oscillator frequency, and standby/wakeup functions as well as short-range accuracy

@Bag132 Bag132 closed this as completed Aug 16, 2023
@PaulZC
Copy link
Contributor

PaulZC commented Aug 16, 2023

Let's keep this open until #7 is merged...

@PaulZC PaulZC reopened this Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants