Skip to content

Commit

Permalink
update flash: add error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Karel Blavka <karel.blavka@hardwario.com>
  • Loading branch information
blavka committed Aug 28, 2024
1 parent 1d5c462 commit 5cd5d72
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/flash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,21 @@ bool Flash::checkErr(nrfjprogdll_err_t err, const QString &context)
case NOT_AVAILABLE_BECAUSE_PROTECTION:
emit deviceMessageReceived(makeMessage("err", context + " operation is not available due to readback protection"));
break;
case EMULATOR_NOT_CONNECTED:
emit deviceMessageReceived(makeMessage("err", context + " emulator not connected"));
break;
case CANNOT_CONNECT:
emit deviceMessageReceived(makeMessage("err", context + " could not connect to any nRF device"));
break;
case WRONG_FAMILY_FOR_DEVICE:
emit deviceMessageReceived(makeMessage("err", context + " connected device does not match the configured family"));
case LOW_VOLTAGE:
emit deviceMessageReceived(makeMessage("err", context + " target voltage is too low"));
break;
case NO_EMULATOR_CONNECTED:
emit deviceMessageReceived(makeMessage("err", context + " there is no emulator connected to the PC"));
break;
case WRONG_FAMILY_FOR_DEVICE:
emit deviceMessageReceived(makeMessage("err", context + " connected device does not match the configured family"));
break;
case INVALID_PARAMETER:
emit deviceMessageReceived(makeMessage("err", context + " the clock_speed_in_khz parameter is not within limits"));
break;
Expand Down

0 comments on commit 5cd5d72

Please sign in to comment.