Skip to content

Commit 81f7e2c

Browse files
Report version correctly.
Sometimes git just gets it wrong.
1 parent a11789d commit 81f7e2c

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/main.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,11 @@ fn main() -> ! {
332332
let mut watchdog = hal::watchdog::Watchdog::new(pp.WATCHDOG);
333333

334334
// VERSION has a trailing `\0` as that is what the BIOS/OS API requires.
335-
info!("Neotron BIOS {} starting...", VERSION.trim_matches('\0'));
335+
info!(
336+
"Neotron BIOS v{} (git:{}) starting...",
337+
env!("CARGO_PKG_VERSION"),
338+
VERSION.trim_matches('\0')
339+
);
336340

337341
// Run at 151.2 MHz SYS_PLL, 48 MHz, USB_PLL. This is important, we as clock
338342
// the PIO at ÷ 6, to give 25.2 MHz (which is close enough to the 25.175
@@ -1308,7 +1312,13 @@ fn sign_on() {
13081312
TextBackgroundColour::BLUE,
13091313
false,
13101314
));
1311-
writeln!(&tc, "BIOS Version: {}", VERSION.trim_matches('\0')).unwrap();
1315+
writeln!(
1316+
&tc,
1317+
"BIOS: v{} (git:{})",
1318+
env!("CARGO_PKG_VERSION"),
1319+
VERSION.trim_matches('\0')
1320+
)
1321+
.unwrap();
13121322

13131323
tc.change_attr(Attr::new(
13141324
TextForegroundColour::WHITE,
@@ -1328,14 +1338,14 @@ fn sign_on() {
13281338
match bmc_ver {
13291339
Ok(string_bytes) => match core::str::from_utf8(&string_bytes) {
13301340
Ok(s) => {
1331-
writeln!(&tc, "BMC Version: {}", s.trim_matches('\0')).unwrap();
1341+
writeln!(&tc, "BMC : {}", s.trim_matches('\0')).unwrap();
13321342
}
13331343
Err(_e) => {
1334-
writeln!(&tc, "BMC Version: Unknown").unwrap();
1344+
writeln!(&tc, "BMC : Version Unknown").unwrap();
13351345
}
13361346
},
13371347
Err(_e) => {
1338-
writeln!(&tc, "BMC Version: Error reading").unwrap();
1348+
writeln!(&tc, "BMC : Error reading version").unwrap();
13391349
}
13401350
}
13411351

0 commit comments

Comments
 (0)