Ejemplo n.º 1
0
void handle_key_2(s32 val) {
    if(val == 0) {
        return;
    }
    if(check_key(2)) {
        if(altMode) {
            // filter / all
        } else {
            if(zeroed) {
                /// set to max
                net_set_in_value(*pageSelect, OP_MAX_VAL);
                zeroed = 0;
            } else {
                /// set to 0
                net_set_in_value(*pageSelect, 0);
                zeroed = 1;
            }
            // render to tmp buffer
            render_line(*pageSelect, 0xf);
            // copy to scroll with highlight
            render_to_scroll_line(SCROLL_CENTER_LINE, 1);
        }
    }
    show_foot();
}
Ejemplo n.º 2
0
// recall everything enabled in given preset
void preset_recall(u32 preIdx) {
  u16 i;
  print_dbg("\r\n preset_recall INS");
  // ins
  for(i=0; i<net_num_ins(); ++i) {
    if(presets[preIdx].ins[i].enabled) {
      print_dbg("\r\n recalling enabled input in target preset, idx: ");
      print_dbg_ulong(i);
      net_set_in_value( i, presets[preIdx].ins[i].value );
    }
  }

  print_dbg("\r\n preset_recall OUTS");
  // outs
  for(i=0; i<net_num_outs(); ++i) {
    if(presets[preIdx].outs[i].enabled) {
      print_dbg("\r\n recalling enabled output in target preset, idx: ");
      print_dbg_ulong(i);
      print_dbg("\r\n , value: 0x");
      print_dbg_hex(presets[preIdx].outs[i].target);

      net_connect( i, presets[preIdx].outs[i].target );
    }
  }

  /* print_dbg("\r\n preset_recall PARAMS"); */
  /* // params */
  /* for(i=0; i<net_num_params(); ++i) { */
  /*   if(presets[preIdx].params[i].enabled) { */

  /*     print_dbg("\r\n recalling enabled input in target preset, idx: "); */
  /*     print_dbg_ulong(i); */

  /*     set_param_value( i, presets[preIdx].params[i].value ); */
  /*   } */
  /* } */

  
  /// process for play mode if we're in play mode
  if(pageIdx == ePagePlay) {
    play_preset(preIdx);
  }

  // update selection
  select = preIdx;
}