-
Notifications
You must be signed in to change notification settings - Fork 48
Update test message for serial monitor #141
Update test message for serial monitor #141
Conversation
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.
Are you able to guide the user based on the error code
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.
The message explains a little better what's happening, we will make sure to let the user know in our troubleshoot doc how they can address it.
@@ -73,7 +73,7 @@ export class SerialPortControl { | |||
this._currentSerialPort = new SerialPortControl.serialport(this._currentPort, { baudRate: this._currentBaudRate }); | |||
this._outputChannel.show(); | |||
this._currentSerialPort.on("open", () => { | |||
this._currentSerialPort.write("msft", "Both NL & CR", (err: any) => { | |||
this._currentSerialPort.write(CONSTANTS.MISC.SERIAL_MONITOR_TEST_IF_OPEN, "Both NL & CR", (err: any) => { | |||
if (err && !(err.message.indexOf(CONSTANTS.ERROR.COMPORT_UNKNOWN_ERROR) >= 0)) { | |||
logToOutputChannel(this._outputChannel, CONSTANTS.ERROR.FAILED_TO_OPEN_SERIAL_PORT(this._currentPort)); |
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 we add after that line another logToOutputChannel
telling them to try re-plugging the device?
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.
Yeah, I'm pretty sure we can add another line that prints to an OutputChannel
if an error occurs. Do you think logging to the Pacifica Simulator
Output Channel is more appropriate?
In my opinion, it would be hard to guide the user based on what the error code is. Best thing to do would be directing the user to unplug the device, re-plug it and try again. Do you think that would be sufficient given our time frame? |
Description:
In this PR, I'm updating the message we're sending to test if the serial port is open. Previously, the message wasn't informative enough to the user.
Type of change
Limitations:
None
Testing:
Can't really reliably test this since we only see the message if the serial port errors out.
Checklist: