void ICACHE_FLASH_ATTR
motor_object_unpack(PARAMS* params) {
	struct motor* motor = create_motor();

	motor->speed = get_next_int8(params);

	motor_set(motor);
	delete_motor(motor);
}
Beispiel #2
0
void ICACHE_FLASH_ATTR
weektask_object_unpack(PARAMS* params) {
	struct weektask* weektask = create_weektask();
	uint16 length = 0;

	weektask->weekday = get_next_bytes(params, &length);
	//weektask->weekday[length] = '\0';

	weektask->time = get_next_bytes(params, &length);
	//weektask->time[length] = '\0';

	weektask->delay = get_next_uint16(params);
	weektask->repeat = get_next_int8(params);
	weektask->enable = get_next_int8(params);

	weektask_set(weektask);
	delete_weektask(weektask);
}