mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user