Merge I2C command handler into main #18

Merged
sebgab merged 15 commits from output-fan-data-over-i2c into main 2024-04-30 08:37:29 +00:00
Showing only changes of commit d964ebea37 - Show all commits

View File

@ -142,9 +142,15 @@ uint8_t route_command(int pos) {
case READ_TERMPERATURE:
return READ_TERMPERATURE;
case READ_FAN_SPEED:
return READ_FAN_SPEED;
if (context.fan == FAN1) {
return fan1_history[0];
} else if (context.fan == FAN2) {
return fan2_history[0];
} else {
return 0;
}
break;
case READ_BULK_FAN_SPEED:
{
if (context.fan == FAN1) {
return fan1_history[pos];
} else if (context.fan == FAN2) {
@ -152,7 +158,7 @@ uint8_t route_command(int pos) {
} else {
return 0;
}
}
break;
case UNKNOWN_COMMAND:
default:
return 0xFF;