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

Ping360 firmware update functionality #1070

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

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.

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 ?

_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. ✔️

- 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
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.

None yet

2 participants