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

implementing #1594 #1616

Merged
merged 18 commits into from
Apr 1, 2023
Merged

implementing #1594 #1616

merged 18 commits into from
Apr 1, 2023

Conversation

discip
Copy link
Collaborator

@discip discip commented Mar 11, 2023

This closes #1594.

@NeilHanlon
@River-Mochi
Please let me know if this is working as expected.

@GPSBabelDeveloper
Unfortunately I had no idea what to put in default.
Any suggestions?

@GPSBabelDeveloper
Copy link

GPSBabelDeveloper commented Mar 11, 2023 via email

@discip discip marked this pull request as ready for review March 11, 2023 14:14
@discip discip enabled auto-merge March 11, 2023 14:16
@discip discip requested a review from robertlipe March 11, 2023 14:17
@discip
Copy link
Collaborator Author

discip commented Mar 11, 2023

@GPSBabelDeveloper
I do understand what this is for, but I did not know if it was necessary. 😊

@River-Mochi
Copy link
Contributor

River-Mochi commented Mar 11, 2023

could just wait for @NeilHanlon since he is also working on the PineSAM BLE app and he wrote the code for this IronOS fix so that these specific things would work correctly from Pinecil V2 communication with the separate PineSAM BLE app.

Neil has a full time job during the week, so he probably could not get to these messages until the weekend.
since Ralim is on vacation there is no rush to push either since we are not getting 2.21 release until he returns.

He is not gone, I just spoke with him last night on some PineSAM app stuff. he just has a full time job.

@discip discip disabled auto-merge March 11, 2023 15:26
@discip
Copy link
Collaborator Author

discip commented Mar 11, 2023

@River-Mochi
My intention was not to rush.

Since the change is marginal (as requested by @NeilHanlon and proposed by @GPSBabelDeveloper: refactoring), the basic function should not be affected.

Then again, no one answered, so I just did the obvious. 😊

No offence intended.

@discip discip changed the title Tried to implement #1594 implementing #1594 Mar 11, 2023
@NeilHanlon
Copy link
Contributor

Agree w/ @GPSBabelDeveloper re having some sort of assertion which acknowledges the code path is nonstandard and should be reported as a bug. BT_ASSERT seems fine, but I'm not versed in the project well. It's probably worth getting this merged in for 2.21, anyways, though.

@River-Mochi
Copy link
Contributor

@discip no worries. I just thought to wait also for Neil's input might be good idea since we have a some time before Ralim returns. and now we have his feedback.

@discip discip requested review from Ralim and robertlipe and removed request for robertlipe March 13, 2023 17:40
@robertlipe
Copy link

I'm not thrilled with settings actions being directly in the BLE, but you left it better than you found it, so thank you.

LGTM

@discip discip enabled auto-merge March 14, 2023 21:03
@gamelaster
Copy link
Collaborator

@discip can this be merged?

@discip
Copy link
Collaborator Author

discip commented Mar 15, 2023

I would like @Ralim to have look first, as I am not quite sure if he is ok with the way this is done.

OLED::setRotation(getSettingValue(SettingsOptions::OrientationMode) & 1);
break;
default:
BT_ASSERT(uuid_value == uuid_value);
Copy link
Owner

Choose a reason for hiding this comment

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

Why this assert?

Copy link
Contributor

Choose a reason for hiding this comment

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

the intention was to notify that this code path was reached. In general it should mean that this block needs to be revisited (or something went really wrong) - since these are currently the only parameters which require additional handling to apply them without restart.

Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure why this would be used; this will always evaluate to true and thus not crash the chip.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't disagree. should we crash the chip?

we left it this way to ask you what should be done, basically.

Copy link
Owner

Choose a reason for hiding this comment

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

I think for now we remove this; but I'm going to have to cleanup an "apply" function for settings

@GPSBabelDeveloper
Copy link

GPSBabelDeveloper commented Mar 28, 2023 via email

@discip
Copy link
Collaborator Author

discip commented Mar 28, 2023

It seems you are all way ahead of me and I am kind of ashamed for having opened this PR. 😅
Obviously I should have left it to someone more capable!

So either someone tells me what exactly to change, or I'll close this and someone else (knowledgeable) creates a new PR. 😊

thanks in advance

@discip discip merged commit e5e77aa into dev Apr 1, 2023
@discip discip deleted the discip-patch-1 branch April 1, 2023 03:24
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.

Refactor display settings handling in BLE callback
7 participants