Skip to content

Commit

Permalink
ccgx: Lign up Version info nicely
Browse files Browse the repository at this point in the history
Before:

```
Left / Ports 01
  Silicon ID:     0x3580
  Mode:           MainFw
  Flash Row Size: 256 B
  Bootloader Version: Base: 3.6.0.9,  App: 0.0.1 (Notebook)
  FW1 (Backup) Version: Base: 3.7.0.208,  App: 0.0.29 (Notebook)
  FW2 (Main)   Version: Base: 3.7.0.208,  App: 0.0.29 (Notebook)
```

After:

```
Left / Ports 01
  Silicon ID:     0x3580
  Mode:           MainFw
  Flash Row Size: 256 B
  Bootloader Version:   Base: 3.6.0.009,  App: 0.0.01 (Notebook)
  FW1 (Backup) Version: Base: 3.7.0.208,  App: 0.0.29 (Notebook)
  FW2 (Main)   Version: Base: 3.7.0.208,  App: 0.0.29 (Notebook)
```

Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Oct 24, 2023
1 parent 13a2b40 commit d891717
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion framework_lib/src/ccgx/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl PdController {
let base_ver = BaseVersion::from(&data[..4]);
let app_ver = AppVersion::from(&data[4..]);
println!(
" Bootloader Version: Base: {}, App: {}",
" Bootloader Version: Base: {}, App: {}",
base_ver, app_ver
);

Expand Down
4 changes: 2 additions & 2 deletions framework_lib/src/ccgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl fmt::Display for BaseVersion {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"{}.{}.{}.{}",
"{}.{}.{}.{:0>3}",
self.major, self.minor, self.patch, self.build_number
)
}
Expand Down Expand Up @@ -161,7 +161,7 @@ impl fmt::Display for AppVersion {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"{}.{}.{} ({:?})",
"{}.{}.{:0>2} ({:?})",
self.major, self.minor, self.circuit, self.application
)
}
Expand Down

0 comments on commit d891717

Please sign in to comment.