rescale ir power (#35858)

* rescale ir value pandad sends to Hardware and changed max ir value in Hardware

* changed ir_percentage type

* refactored pandad.cc ir_pwr setting

* cleaned up ir update condition

---------

Co-authored-by: kostas pats <kostas@comma.ai>
This commit is contained in:
kostas.pats
2025-08-01 00:17:22 +03:00
committed by GitHub
parent 3187631935
commit e32a2ce164
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ public:
return;
}
int value = util::map_val(std::clamp(percent, 0, 100), 0, 100, 0, 255);
int value = util::map_val(std::clamp(percent, 0, 100), 0, 100, 0, 300);
std::ofstream("/sys/class/leds/led:switch_2/brightness") << 0 << "\n";
std::ofstream("/sys/class/leds/led:torch_2/brightness") << value << "\n";
std::ofstream("/sys/class/leds/led:switch_2/brightness") << value << "\n";