Small fixes

- Fix parseable string of MODOP_TOGGLE
 - Actually set the configured namespace in nodes/evdev
 - Ensure non-negative payload in nodes/getchar
This commit is contained in:
Vftdan 2024-08-18 15:23:49 +02:00
parent 01bf0a9608
commit 8b55223b9d
3 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ modifier_operation_parse(const char* name)
if (strcmp(name, "reset") == 0) { if (strcmp(name, "reset") == 0) {
return MODOP_UNSET; return MODOP_UNSET;
} }
if (strcmp(name, "togggle") == 0) { if (strcmp(name, "toggle") == 0) {
return MODOP_TOGGLE; return MODOP_TOGGLE;
} }
return -1; return -1;

View File

@ -47,7 +47,7 @@ handle_io(EventPositionBase * self, int fd, bool is_output)
monotime = absolute_time_sub_relative(realtime, realtime_adj); monotime = absolute_time_sub_relative(realtime, realtime_adj);
EventData data = { EventData data = {
.code = { .code = {
.ns = 1, .ns = node->namespace,
.major = buf.type, .major = buf.type,
.minor = buf.code, .minor = buf.code,
}, },

View File

@ -29,7 +29,7 @@ handle_io(EventPositionBase * self, int fd, bool is_output)
}, },
.ttl = 100, .ttl = 100,
.priority = 10, .priority = 10,
.payload = buf[0], .payload = (unsigned char) buf[0],
.modifiers = EMPTY_MODIFIER_SET, .modifiers = EMPTY_MODIFIER_SET,
.time = get_current_time(), .time = get_current_time(),
}; };