generated from dave/wails-template
Scroll lamps to 255 as they should be
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
});
|
||||
|
||||
function handleBrightnessChange(lamp: number, brightness: number) {
|
||||
SetLampBrightness(lamp, brightness);
|
||||
// Brightness is actually 1-255 and not 1-100
|
||||
// But we want the frontend to show 1-100 as in %
|
||||
SetLampBrightness(lamp, Math.round(brightness * 2.55));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user