Exemple #1
0
void AsebaVMResetCB(AsebaVMState *vm) {
	leds_set_circle(0,0,0,0,0,0,0,0);
	leds_set_body_rgb(0,0,0);
	leds_set(LED_SOUND,0);
	leds_set(LED_RC,0);
	behavior_start(B_LEDS_ACC);
	behavior_start(B_LEDS_NTC);
	behavior_start(B_LEDS_MIC);
	behavior_start(B_LEDS_PROX);
	behavior_start(B_SOUND_BUTTON);
	behavior_start(B_LEDS_MIC);
	behavior_start(B_LEDS_RC5);
	prox_disable_network();
	memset(vm->variables, 0, vm->variablesSize*sizeof(sint16));
	vmVariables.id = vmState.nodeId;
	vmVariables.productid = PRODUCT_ID;
	vmVariables.fwversion[0] = FW_VERSION;
	vmVariables.fwversion[1] = FW_VARIANT;	
}
Exemple #2
0
void AsebaVMResetCB(AsebaVMState *vm) {
	leds_set_circle(0,0,0,0,0,0,0,0);
	leds_set_body_rgb(0,0,0);
	leds_set(LED_SOUND,0);
	leds_set(LED_RC,0);
	behavior_start(B_LEDS_ACC);
	behavior_start(B_LEDS_NTC);
	behavior_start(B_LEDS_MIC);
	behavior_start(B_LEDS_PROX);
	behavior_start(B_SOUND_BUTTON);
	behavior_start(B_LEDS_MIC);
	behavior_start(B_LEDS_RC5);
	prox_disable_network();
	events_flags[0] = 0;
	events_flags[1] = 0;
	memset(vm->variables, 0, vm->variablesSize*sizeof(int16_t));
	vmVariables.id = vmState.nodeId;
	vmVariables.productid = PRODUCT_ID;
	vmVariables.fwversion[0] = FW_VERSION;
	vmVariables.fwversion[1] = FW_VARIANT;
	vmVariables.sd_present = !sd_user_open("_TESTSD");
	sd_user_open(NULL);	
}