-
Notifications
You must be signed in to change notification settings - Fork 40
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
base: master
Are you sure you want to change the base?
Conversation
5040c20
to
01e0568
Compare
There was a problem hiding this 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; |
There was a problem hiding this comment.
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 ?
src/flash/ping360flashworker.cpp
Outdated
_port = new QSerialPort(); | ||
QSerialPortInfo pInfo(_link.serialPort()); | ||
_port->setPort(pInfo); | ||
_port->setBaudRate(115200); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. ✔️
d94d4dd
to
9a0a885
Compare
d96fc16
to
68fa8b4
Compare
7d49504
to
68fa8b4
Compare
…udrate this buadrate is used by default when debug mode is not selected 115200 is the only valid baudrate in common for both supported sensors
the protocol detector functionality is not necessary or used during mannual connection. In fact, the protocol detector scan may interfere with sensor (ping360 bootloader) communication or operation by writing extraneous/ unexpected data. When selecting manual connection, the sensor may be connected without writing unnecessary bytes.
- 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
copied the same logic from set_range
Add firmware update functionality for Ping360.
This is based on top of #1069The 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.