|
|
|
@ -61,7 +61,24 @@ export fn nm_create_info_panel(parent: *lvgl.LvObj) c_int {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn createInfoPanel(parent: *lvgl.LvObj) !void {
|
|
|
|
|
parent.flexFlow(.column);
|
|
|
|
|
parent.flexAlign(.start, .start, .start);
|
|
|
|
|
|
|
|
|
|
var buf: [100]u8 = undefined;
|
|
|
|
|
const s = try std.fmt.bufPrintZ(&buf, "ndg version: {any}", .{buildopts.semver});
|
|
|
|
|
_ = try lvgl.createLabel(parent, s, .{ .long_mode = .wrap, .pos = .none });
|
|
|
|
|
const sver = try std.fmt.bufPrintZ(&buf, "nakamochi software version: {any}", .{buildopts.semver});
|
|
|
|
|
_ = try lvgl.createLabel(parent, sver, .{ .long_mode = .wrap, .pos = .none });
|
|
|
|
|
|
|
|
|
|
const epoch: std.time.epoch.EpochSeconds = .{ .secs = buildopts.build_timestamp };
|
|
|
|
|
const daysec = epoch.getDaySeconds();
|
|
|
|
|
const yearday = epoch.getEpochDay().calculateYearDay();
|
|
|
|
|
const monthday = yearday.calculateMonthDay();
|
|
|
|
|
const ts = try std.fmt.bufPrintZ(&buf, "build timestamp: {d}-{d:0>2}-{d:0>2} {d:0>2}:{d:0>2}:{d:0>2} UTC", .{
|
|
|
|
|
yearday.year,
|
|
|
|
|
monthday.month.numeric(),
|
|
|
|
|
monthday.day_index + 1,
|
|
|
|
|
daysec.getHoursIntoDay(),
|
|
|
|
|
daysec.getMinutesIntoHour(),
|
|
|
|
|
daysec.getSecondsIntoMinute(),
|
|
|
|
|
});
|
|
|
|
|
_ = try lvgl.createLabel(parent, ts, .{ .long_mode = .wrap, .pos = .none });
|
|
|
|
|
}
|
|
|
|
|