Ejemplo n.º 1
0
void onLedSetMode()
{
	uint8_t mode = (uint8_t)cmdMessenger.readInt16Arg();
	if (mode>=LED_CONTROL_MODE_RESTORE && mode<=LED_CONTROL_MODE_OFF)
	{
		ledControlModeRestore = ledControlMode;
		ledControlMode = mode;
		if (ledControlMode == LED_CONTROL_MODE_ALS_PS) {
			ledFadeTarget = ledFadeTargetMin;
			sensorPollALS = true;
		}
	}
	onLedReturnMode();
}
Ejemplo n.º 2
0
void onLedSetFadeLimits()
{
	uint8_t lower = (uint8_t)cmdMessenger.readInt16Arg();
	uint8_t upper = (uint8_t)cmdMessenger.readInt16Arg();

	if (lower>= 0 && lower<= 100 && lower<=upper)
	{
		ledFadeTargetMin = lower;
	}
	if (upper>=0 && upper<=100 && lower<=upper)
	{
		ledFadeTargetMax = upper;
	}
	onLedReturnFadeLimits();
}
Ejemplo n.º 3
0
void onLedFadeTo()
{
	ledFadeTarget = (uint8_t)cmdMessenger.readInt16Arg();
}