update to latest Zig and add SIGUSR1 refresh

This commit is contained in:
Jeeves 2024-04-07 11:10:02 -06:00
parent 9e8b663694
commit 448c736a32
14 changed files with 69 additions and 60 deletions

View file

@ -14,7 +14,7 @@ pub fn init(allocator: std.mem.Allocator) Self {
}
pub fn getJson(module: *const Module) !Module.JSON {
const self = @fieldParentPtr(Self, "module", module);
const self: *const Self = @fieldParentPtr("module", module);
var energy_full_file = try std.fs.openFileAbsolute("/sys/class/power_supply/BAT0/energy_full", .{});
defer energy_full_file.close();