Skip to content

Ping360 firmware update functionality#1070

Merged
patrickelectric merged 38 commits intobluerobotics:masterfrom
jaxxzer:p360flash-5
Apr 17, 2025
Merged

Ping360 firmware update functionality#1070
patrickelectric merged 38 commits intobluerobotics:masterfrom
jaxxzer:p360flash-5

Conversation

@jaxxzer
Copy link
Member

@jaxxzer jaxxzer commented Dec 19, 2023

Add firmware update functionality for Ping360.

This is based on top of #1069

The bootloader will wait for communication for 2s after powering on before it automatically starts the main application firmware. If the bootloader receives a valid packet, then it will not automatically start the main application.

If the device is stuck in the bootloader (failed programming), the protocol detector and device manager will still identify the device as a ping360 and let you select it. Then there will be a message over the polarplot telling you the device is stuck in the bootloader and asking you to update the firmware.

If the device with valid firmware is plugged in while the protocol detector/device manager is running, then the detector may see the bootloader before the firmware is automatically started. The detector will ask the bootloader to start the main application firmware and all proceeds as normal.

@jaxxzer jaxxzer force-pushed the p360flash-5 branch 6 times, most recently from 5040c20 to 01e0568 Compare December 20, 2023 21:20
Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

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

Some comments


void Ping360FlashWorker::run()
{
float flashProgressPercentFactor = _verify ? 33.3f : 50.0f;
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some explanation about this numbers ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

_port = new QSerialPort();
QSerialPortInfo pInfo(_link.serialPort());
_port->setPort(pInfo);
_port->setBaudRate(115200);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't that supposed to be configured ? Since flasher now has validBaudRates

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, there is only one valid baudrate, but yes ✔️

}

if (!_port->isOpen()) {
error("error opening port");
Copy link
Member

Choose a reason for hiding this comment

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

Aren't we supposed to return here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. ✔️

@jaxxzer jaxxzer force-pushed the p360flash-5 branch 3 times, most recently from d94d4dd to 9a0a885 Compare January 29, 2024 20:19
@jaxxzer jaxxzer force-pushed the p360flash-5 branch 5 times, most recently from d96fc16 to 68fa8b4 Compare February 1, 2024 23:01
@jaxxzer jaxxzer force-pushed the p360flash-5 branch 6 times, most recently from 7d49504 to 68fa8b4 Compare March 6, 2024 16:43
@jaxxzer jaxxzer force-pushed the p360flash-5 branch 2 times, most recently from 3d296d1 to ea47720 Compare October 11, 2024 21:37
@jaxxzer jaxxzer force-pushed the p360flash-5 branch 2 times, most recently from 3b4b679 to ed02b6e Compare February 21, 2025 05:05
jaxxzer added 27 commits April 17, 2025 07:58
- send requensts when sensor settings struct is valid,
  this allows adjusting/updating the sensor settings during async scan
- reset baudrate to avoid collisions during async profile message transmission
- start profile timeout timer to ensure new profile request is received
…han once

this allows the logic type to be updated after a firmware update
This is a parameter needed for auto transmit strategy
fw 3.1.1 will get hung up otherwise and not respond to timeout profile requests
though the bootloader may not respond, if the application is booting
the application may not respond to the initial device information request
startConfiguration will trigger checkBaudrateProcess, which will
repeatedly send the device information request
@patrickelectric patrickelectric merged commit 6572633 into bluerobotics:master Apr 17, 2025
4 checks passed
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.

2 participants

Comments