コード例 #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();
}
コード例 #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();
}
コード例 #3
0
void onLedFadeTo()
{
	ledFadeTarget = (uint8_t)cmdMessenger.readInt16Arg();
}