Skip to content

Commit

Permalink
Fix bug displaying wrong serial port config in toolbar.
Browse files Browse the repository at this point in the history
- Corrected bug showing incorrect serial port config in the bottom toolbar by updating the calculation of the short hand serial port configuration for display to the user.
  • Loading branch information
gbmhunter committed May 16, 2024
1 parent 7c5d4bd commit 78d996a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

### Fixed

- Fixed bug which caused the wrong serial port config to be displayed in the bottom toolbar.

## [4.15.0] - 2024-05-14

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,15 @@ export default class PortConfiguration {
* Computed value which represents the serial port config in short hand,
* e.g. "115200 8n1"
*
* @returns The short hand serial port config for displaying.
* @returns The short hand serial port config for displaying to the user.
*/
get shortSerialConfigName() {
let output = '';
output += this.config.baudRate.toString();
output += ' ';
// output += this.selectedNumDataBits.toString();
// output += this.selectedParity[0];
// output += this.selectedStopBits.toString();
output += '8n1'; // TODO: Fix this
output += this.config.numDataBits.toString();
output += this.config.parity[0]; // Take first letter of parity, e.g. (n)one, (e)ven, (o)dd
output += this.config.stopBits.toString();
return output;
}
}
Expand Down

0 comments on commit 78d996a

Please sign in to comment.