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

Get accelerometerThread running from AdminModule. #4886

Merged
merged 10 commits into from
Sep 29, 2024

Conversation

gjelsoe
Copy link
Contributor

@gjelsoe gjelsoe commented Sep 27, 2024

The accelerometerThread fails to start do to new values in c.payload_variant.device.double_tap_as_button_press or c.payload_variant.display.wake_on_tap_or_motion are not stored in config.device.double_tap_as_button_press or config.display.wake_on_tap_or_motion before accelerometerThread->start() is called, it will compare to old values. AccelerometerThread is also disabled with disabled() so it needs to be enabled again before accelerometerThread->start().

Download firmware-2.5.4.fa79bf1.zip. This artifact will be available for 90 days from creation

in `c.payload_variant.device.double_tap_as_button_press` or `c.payload_variant.display.wake_on_tap_or_motion` are not stored in `config.device.double_tap_as_button_press` or `config.display.wake_on_tap_or_motion` before `accelerometerThread->start()` is called, it will compare to old values. AccelerometerThread is also disabled with `disabled()` so it needs to be enabled again before `accelerometerThread->start()`.

Download firmware-2.5.4.1a0e7ab.zip. This artifact will be available for 90 days from creation

in `c.payload_variant.device.double_tap_as_button_press` or `c.payload_variant.display.wake_on_tap_or_motion` are not stored in `config.device.double_tap_as_button_press` or `config.display.wake_on_tap_or_motion` before `accelerometerThread->start()` is called, it will compare to old values. AccelerometerThread is also disabled with `disabled()` so it needs to be enabled again before `accelerometerThread->start()`.

Download firmware-2.5.4.fa79bf1.zip. This artifact will be available for 90 days from creation

in `c.payload_variant.device.double_tap_as_button_press` or `c.payload_variant.display.wake_on_tap_or_motion` are not stored in `config.device.double_tap_as_button_press` or `config.display.wake_on_tap_or_motion` before `accelerometerThread->start()` is called, it will compare to old values. AccelerometerThread is also disabled with `disabled()` so it needs to be enabled again before `accelerometerThread->start()`.

The accelerometerThread fails to start do to new values in `c.payload_variant.device.double_tap_as_button_press`
or `c.payload_variant.display.wake_on_tap_or_motion` are not stored in `config.device.double_tap_as_button_press`
or `config.display.wake_on_tap_or_motion` before `accelerometerThread->start()` is called, it will compare to
old values. AccelerometerThread is also disabled with `disabled()` so it needs to be enabled again
before `accelerometerThread->start()`.
@caveman99
Copy link
Member

you could also call setIntervalFromNow(0) to start it again. disable just sets the next execution to MAX_UINT

@gjelsoe
Copy link
Contributor Author

gjelsoe commented Sep 27, 2024

you could also call setIntervalFromNow(0) to start it again. disable just sets the next execution to MAX_UINT

So accelerometerThread->setIntervalFromNow(0) would have done the same as accelerometerThread->enabled = true ?

@caveman99
Copy link
Member

you could also call setIntervalFromNow(0) to start it again. disable just sets the next execution to MAX_UINT

So accelerometerThread->setIntervalFromNow(0) would have done the same as accelerometerThread->enabled = true ?

Err, nope - the enabled is still neccessary, but the start is not :-) It was more like a remark´than a change request.

@gjelsoe
Copy link
Contributor Author

gjelsoe commented Sep 29, 2024

you could also call setIntervalFromNow(0) to start it again. disable just sets the next execution to MAX_UINT

So accelerometerThread->setIntervalFromNow(0) would have done the same as accelerometerThread->enabled = true ?

Err, nope - the enabled is still neccessary, but the start is not :-) It was more like a remark´than a change request.

Don't mind removing it if it's not necessarily.

@gjelsoe
Copy link
Contributor Author

gjelsoe commented Sep 29, 2024

you could also call setIntervalFromNow(0) to start it again. disable just sets the next execution to MAX_UINT

So accelerometerThread->setIntervalFromNow(0) would have done the same as accelerometerThread->enabled = true ?

Err, nope - the enabled is still neccessary, but the start is not :-) It was more like a remark´than a change request.

I've just tested it without accelerometerThread->start() and it doesn't work on the Bandit without.
I2Cs doesn't get initialized.

@thebentern thebentern merged commit d73cbf1 into meshtastic:master Sep 29, 2024
36 checks passed
@gjelsoe gjelsoe deleted the Bandit-Accelerometer-Start-Fix branch September 29, 2024 18:23
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