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

Add first calibration abstraction #2339

Merged
merged 3 commits into from Mar 26, 2024

Conversation

patrickelectric
Copy link
Member

@patrickelectric patrickelectric commented Jan 24, 2024

Peek 2024-03-18 11-36

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Status
</th>
<th class="text-left">
Calibrate
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Calibrate
Calibrated at

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

private calibrationStatus: MavResult | undefined

constructor() {
mavlink2rest.startListening(MAVLinkType.COMMAND_ACK).setCallback((content) => {
Copy link
Member

Choose a reason for hiding this comment

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

can we make it so this listener only lives while the calibration is being done?

start it at start() and discard() it when the calibration is successful/fails

Copy link
Member Author

Choose a reason for hiding this comment

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

This is mostly a free websocket, it's handle by the server where it only sends the messages that match the regex. Since it's registered to COMMAND_ACK, it should have no performance impact.

Copy link
Member

@Williangalvani Williangalvani left a comment

Choose a reason for hiding this comment

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

wait. it is still showing "unknown pressure" here

@patrickelectric patrickelectric added the merge-after-stable Should be merged only after next stable release label Mar 18, 2024
@patrickelectric
Copy link
Member Author

wait. it is still showing "unknown pressure" here

Codewise is not possible, be sure to open in an anonymous tab.

for (const barometer of this.baros) {
// BARO_SPEC_GRAV Only exist for underwater vehicles
const spec_gravity_param = autopilot_data.parameter('BARO_SPEC_GRAV')
results[barometer.param] = printParam(spec_gravity_param) ?? 'Barometric'
Copy link
Member

Choose a reason for hiding this comment

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

printParam returns "Unknown" as a string if the parameter is undefined:
https://github.com/bluerobotics/BlueOS/blob/master/core/frontend/src/types/autopilot/parameter.ts#L44

Copy link
Member Author

Choose a reason for hiding this comment

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

Check now

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@patrickelectric
Copy link
Member Author

ping @Williangalvani

@Williangalvani Williangalvani merged commit 02a803a into bluerobotics:master Mar 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-after-stable Should be merged only after next stable release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants