update to latest Zig and add SIGUSR1 refresh
This commit is contained in:
parent
9e8b663694
commit
448c736a32
14 changed files with 69 additions and 60 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue