I've built a clockface back in the 2019 and now I'm trying to make some updates but it seems like in SDK v4.3 I can't control the brightness of display anymore:
var flashlightToggle = function() {
if (flash.style.opacity == 0) {
flashlightOn();
} else {
flashlightOff();
}
};
var flashlightOn = function() {
flash.style.opacity = 1;
display.autoOff = false;
display.brightnessOverride = 1.0;
};
var flashlightOff = function() {
flash.style.opacity = 0;
display.autoOff = true;
display.brightnessOverride = undefined;
};In this context, flash is a white rectangle that takes the whole screen, and when triggered, acts like a flashlight and helps me find my way to bed every evening.
Using auto-brightness in situations where you need a flashlight doesn't make sense.
How can I get this functionality back?
Answered! Go to the Best Answer.
Best AnswerI've made an update and even though it doesn't trow an error anymore, it does not work in practice. My "flashlight" is now almost useless 😞
var flashlightToggle = function() {
if (flash.style.opacity == 0) {
flashlightOn();
} else {
flashlightOff();
}
};
var flashlightOn = function() {
flash.style.opacity = 1;
display.autoOff = false;
//display.brightnessOverride = 1.0;
display.DisplayBrightnessValue = "max";
};
var flashlightOff = function() {
flash.style.opacity = 0;
display.autoOff = true;
// display.brightnessOverride = undefined;
display.DisplayBrightnessValue = "normal";
};How can I fix it?!?
Best Answer
Fitbit Product Experts Alumni are retired members of the Fitbit Product Expert Program. Learn more