static void handler_MonomeConnect(s32 data) { // print_dbg("\r\n// monome connect /////////////////"); key_count = 0; SIZE = monome_size_x(); LENGTH = SIZE - 1; // print_dbg("\r monome size: "); // print_dbg_ulong(SIZE); VARI = monome_is_vari(); // print_dbg("\r monome vari: "); // print_dbg_ulong(VARI); if(VARI) re = &refresh; else re = &refresh_mono; shape_key_count = 0; key_count = 0; timers_set_monome(); monome_set_quadrant_flag(0); monome_set_quadrant_flag(1); // turn on ADC polling, reset hysteresis adc_convert(&adc); reset_hys(); timer_add(&adcTimer,61,&adcTimer_callback, NULL); }
static void handler_MonomeConnect(s32 data) { // print_dbg("\r\n// monome connect /////////////////"); key_count = 0; SIZE = monome_size_x(); LENGTH = SIZE - 1; // print_dbg("\r monome size: "); // print_dbg_ulong(SIZE); VARI = monome_is_vari(); // print_dbg("\r monome vari: "); // print_dbg_ulong(VARI); if(VARI) re = &refresh; else re = &refresh_mono; // monome_set_quadrant_flag(0); // monome_set_quadrant_flag(1); timers_set_monome(); }
//------------------------------------------------- //----- extern function definition void op_step_init(void* mem) { u8 i; // print_dbg("\r\n op_step_init "); op_step_t* op = (op_step_t*)mem; // superclass functions //--- op op->super.in_fn = op_step_in_fn; op->super.pickle = (op_pickle_fn) (&op_step_pickle); op->super.unpickle = (op_unpickle_fn) (&op_step_unpickle); //--- monome op->monome.handler = (monome_handler_t)&op_step_handler; op->monome.op = op; // superclass state op->super.type = eOpStep; op->super.flags |= (1 << eOpFlagMonomeGrid); op->super.numInputs = 3; op->super.numOutputs = 8; op->super.in_val = op->in_val; op->super.out = op->outs; op->super.opString = op_step_opstring; op->super.inString = op_step_instring; op->super.outString = op_step_outstring; op->in_val[0] = &(op->focus); op->in_val[1] = &(op->size); op->outs[0] = -1; op->outs[1] = -1; op->outs[2] = -1; op->outs[3] = -1; op->outs[4] = -1; op->outs[5] = -1; op->outs[6] = -1; op->outs[7] = -1; op->s_start = 0; op->s_end = 7; op->s_length = 7; op->s_now = 0; op->s_cut = 0; op->s_start2 = 0; op->s_end2 = 7; op->s_length2 = 7; op->s_now2 = 0; op->s_cut2 = 0; op->size = monome_size_x(); op->focus = OP_ONE; net_monome_set_focus(&(op->monome), 1); // init monome drawing, maybe should clear first monomeLedBuffer[monome_xy_idx(0, 0)] = 15; monomeLedBuffer[monome_xy_idx(0, 2)] = 15; for(i=0;i<op->size;i++) { monomeLedBuffer[monome_xy_idx(i, 1)] = 15; monomeLedBuffer[monome_xy_idx(i, 3)] = 15; } monome_set_quadrant_flag(0); }