Config: perform basic validation

This just makes sure the parking posture is within the valid range of
motion of the rotator.
This commit is contained in:
2024-07-07 15:36:14 -07:00
parent 8fb6032a04
commit dbb076f69b
2 changed files with 55 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ pub fn main() !u8 {
};
defer conf_file.close();
Config.load(allocator, conf_file.reader()) catch |err| {
Config.load(allocator, conf_file.reader(), std.io.getStdErr().writer()) catch |err| {
log.err("Could not parse config file '{s}': {s}.", .{ confpath, @errorName(err) });
return 1;
};