path: root/examples/serialbus/can/sendframebox.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CAN Example: Fix entering invalid chars in CAN ID inputAndre Hartmann2019-04-291-1/+1
| | | | | | | | | | | | | | The old code returned Intermediate for invalid inputs (e.g. chars outside the A-F range or special characters), because input.toUInt() returned 0 for these cases. Fix that by checking ok from input.toUInt(&ok) first. To allow clearing an edit field containing valid input with backspace again, an additional isEmpty() check has to be added. Change-Id: I4ae28e35ca21611fc5f323b26cdeca75257f1352 Reviewed-by: Alex Blasche <>
* Fix outdated BSD license headerLiang Qi2017-11-161-2/+12
| | | | | Change-Id: I93a7fa404ade8b55a1410956ba9b17976fec71d0 Reviewed-by: Kai Koehne <>
* CAN-Example: Disable Send button if frame id is emptyv5.10.0-beta1Andre Hartmann2017-10-041-0/+9
| | | | | | | | | | Every CAN frame needs a CAN-ID to be sent. Disable the Send button with a informative tooltip if this condition is not met. Change-Id: I77033a36c4a45c136185135776ef79185dc548be Reviewed-by: Rolf Eike Beer <> Reviewed-by: Denis Shienkov <> Reviewed-by: Alex Blasche <>
* CAN-Example: Add a dedicated send frame group boxAndre Hartmann2017-07-171-0/+182
By moving the send frame logic to a separate panel, the MainWindow gets easier to understand as it only connects signals to slots. The new SendFramesBox also does more sanity check on the parameters (options that exclude each other are checked) and forbids invalid input by using QValidators. The payload input is also prettified with spaces. This was first done by InputMasks but this had strange side effects so now the input validator is used for this task also. Change-Id: Ib95605ce4bc23b52d1cf5d082b1533b2a59f7749 Reviewed-by: Alex Blasche <>