Subversion Repositories svn.mios32

Rev

Rev 2057 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2057 Rev 2634
Line 1... Line 1...
1
// $Id: seq_file_bm.c 2057 2014-09-13 23:45:36Z tk $
1
// $Id: seq_file_bm.c 2634 2019-01-05 16:51:12Z tk $
2
/*
2
/*
3
 * Bookmark File access functions
3
 * Bookmark File access functions
4
 *
4
 *
5
 * NOTE: before accessing the SD Card, the upper level function should
5
 * NOTE: before accessing the SD Card, the upper level function should
6
 * synchronize with the SD Card semaphore!
6
 * synchronize with the SD Card semaphore!
Line 285... Line 285...
285
      seq_ui_page_t page = SEQ_UI_PAGES_CfgNameSearch(word);
285
      seq_ui_page_t page = SEQ_UI_PAGES_CfgNameSearch(word);
286
      if( page == SEQ_UI_PAGE_NONE ) {
286
      if( page == SEQ_UI_PAGE_NONE ) {
287
        s32 value = get_dec(word);
287
        s32 value = get_dec(word);
288
        if( value <= 0 ) {
288
        if( value <= 0 ) {
289
#if DEBUG_VERBOSE_LEVEL >= 1
289
#if DEBUG_VERBOSE_LEVEL >= 1
290
          DEBUG_MSG("[SEQ_FILE_BM] ERROR invalid value '%s' for parameter '%s' in Slot %d\n", word, parameter, current_bookmark);
290
          DEBUG_MSG("[SEQ_FILE_BM] ERROR invalid value '%s' for parameter '%s' in Slot %d\n", word, parameter, current_bookmark+1);
291
#endif
291
#endif
292
        } else {
292
        } else {
293
          page = SEQ_UI_PAGES_OldBmIndexSearch(value);
293
          page = SEQ_UI_PAGES_OldBmIndexSearch(value);
294
        }
294
        }
295
      }
295
      }
296
296
297
      if( page == SEQ_UI_PAGE_NONE ) {
297
      if( page == SEQ_UI_PAGE_NONE ) {
298
#if DEBUG_VERBOSE_LEVEL >= 1
298
#if DEBUG_VERBOSE_LEVEL >= 1
299
        DEBUG_MSG("[SEQ_FILE_BM] ERROR invalid value '%s' for parameter '%s' in Slot %d\n", word, parameter, current_bookmark);
299
        DEBUG_MSG("[SEQ_FILE_BM] ERROR invalid value '%s' for parameter '%s' in Slot %d\n", word, parameter, current_bookmark+1);
300
#endif
300
#endif
301
      } else {
301
      } else {
302
        bm->page = page;
302
        bm->page = page;
303
        bm->enable.PAGE = parameter_enabled;
303
        bm->enable.PAGE = parameter_enabled;
304
      }
304
      }
Line 308... Line 308...
308
      s32 value = get_dec(word);
308
      s32 value = get_dec(word);
309
      seq_ui_bookmark_t *bm = &seq_ui_bookmarks[current_bookmark];
309
      seq_ui_bookmark_t *bm = &seq_ui_bookmarks[current_bookmark];
310
310
311
      if( value < 0 ) {
311
      if( value < 0 ) {
312
#if DEBUG_VERBOSE_LEVEL >= 1
312
#if DEBUG_VERBOSE_LEVEL >= 1
313
        DEBUG_MSG("[SEQ_FILE_BM] ERROR invalid value '%s', for parameter '%s' in Slot %d\n", word, parameter, current_bookmark);
313
        DEBUG_MSG("[SEQ_FILE_BM] ERROR invalid value '%s', for parameter '%s' in Slot %d\n", word, parameter, current_bookmark+1);
314
#endif
314
#endif
315
      } else if( strcmp(parameter, "Group") == 0 ) {
315
      } else if( strcmp(parameter, "Group") == 0 ) {
316
        bm->group = value - 1;
316
        bm->group = value - 1;
317
        bm->enable.GROUP = parameter_enabled;
317
        bm->enable.GROUP = parameter_enabled;
318
      } else if( strcmp(parameter, "Instrument") == 0 ) {
318
      } else if( strcmp(parameter, "Instrument") == 0 ) {
Line 345... Line 345...
345
      } else if( strcmp(parameter, "FollowMode") == 0 ) {
345
      } else if( strcmp(parameter, "FollowMode") == 0 ) {
346
        bm->flags.FOLLOW = value ? 1 : 0;
346
        bm->flags.FOLLOW = value ? 1 : 0;
347
        bm->enable.FOLLOW = parameter_enabled;
347
        bm->enable.FOLLOW = parameter_enabled;
348
      } else {
348
      } else {
349
#if DEBUG_VERBOSE_LEVEL >= 1
349
#if DEBUG_VERBOSE_LEVEL >= 1
350
        DEBUG_MSG("[SEQ_FILE_HW] ERROR: unknown parameter: %s in Slot %d", line_buffer, current_bookmark);
350
        DEBUG_MSG("[SEQ_FILE_HW] ERROR: unknown parameter: %s in Slot %d", line_buffer, current_bookmark+1);
351
#endif
351
#endif
352
      }
352
      }
353
    }
353
    }
354
      } else {
354
      } else {
355
#if DEBUG_VERBOSE_LEVEL >= 1
355
#if DEBUG_VERBOSE_LEVEL >= 1