void ButtonMachine::setSignature() { int res; // grow region, create model, save res = cc_setSigPoint(0, m_index, CAM_RES2_WIDTH/2, CAM_RES2_HEIGHT/2); if (res<0) return; exec_sendEvent(g_chirpUsb, EVT_PARAM_CHANGE); flashLED(4); }
void ButtonMachine::setSignature() { uint32_t current, saveCurrent; int goodness; // grow region, create model, save goodness = cc_setSigPoint(0, m_index, CAM_RES2_WIDTH/2, CAM_RES2_HEIGHT/2, g_chirpUsb); if (goodness>0) { cprintf("goodness=%d\n", goodness); saveCurrent = led_getMaxCurrent(); // save off value current = (float)LED_MAX_CURRENT/100.0f*goodness; led_setMaxCurrent(current); flashLED(4); led_setMaxCurrent(saveCurrent); } }