@@ -341,7 +341,7 @@ mp_obj_t Channel_play_tone(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw
341
341
/* **** Variables Struct *****/
342
342
typedef struct _CosmicUnicorn_obj_t {
343
343
mp_obj_base_t base;
344
- CosmicUnicorn* Cosmic ;
344
+ CosmicUnicorn* cosmic ;
345
345
} _CosmicUnicorn_obj_t;
346
346
347
347
typedef struct _ModPicoGraphics_obj_t {
@@ -388,12 +388,12 @@ mp_obj_t CosmicUnicorn_make_new(const mp_obj_type_t *type, size_t n_args, size_t
388
388
}
389
389
390
390
391
- CosmicUnicorn *Cosmic = m_new_class (CosmicUnicorn);
392
- Cosmic ->init ();
391
+ CosmicUnicorn *cosmic = m_new_class (CosmicUnicorn);
392
+ cosmic ->init ();
393
393
394
394
self = m_new_obj_with_finaliser (_CosmicUnicorn_obj_t);
395
395
self->base .type = &CosmicUnicorn_type;
396
- self->Cosmic = Cosmic ;
396
+ self->cosmic = cosmic ;
397
397
398
398
return MP_OBJ_FROM_PTR (self);
399
399
}
@@ -402,70 +402,70 @@ mp_obj_t CosmicUnicorn_make_new(const mp_obj_type_t *type, size_t n_args, size_t
402
402
/* **** Destructor ******/
403
403
mp_obj_t CosmicUnicorn___del__ (mp_obj_t self_in) {
404
404
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
405
- m_del_class (CosmicUnicorn, self->Cosmic );
405
+ m_del_class (CosmicUnicorn, self->cosmic );
406
406
return mp_const_none;
407
407
}
408
408
409
409
410
410
/* **** Methods *****/
411
411
extern mp_obj_t CosmicUnicorn_clear (mp_obj_t self_in) {
412
412
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
413
- self->Cosmic ->clear ();
413
+ self->cosmic ->clear ();
414
414
return mp_const_none;
415
415
}
416
416
417
417
extern mp_obj_t CosmicUnicorn_update (mp_obj_t self_in, mp_obj_t graphics_in) {
418
418
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
419
419
ModPicoGraphics_obj_t *picographics = MP_OBJ_TO_PTR2 (graphics_in, ModPicoGraphics_obj_t);
420
420
421
- self->Cosmic ->update (picographics->graphics );
421
+ self->cosmic ->update (picographics->graphics );
422
422
423
423
return mp_const_none;
424
424
}
425
425
426
426
extern mp_obj_t CosmicUnicorn_set_brightness (mp_obj_t self_in, mp_obj_t value) {
427
427
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
428
- self->Cosmic ->set_brightness (mp_obj_get_float (value));
428
+ self->cosmic ->set_brightness (mp_obj_get_float (value));
429
429
return mp_const_none;
430
430
}
431
431
432
432
extern mp_obj_t CosmicUnicorn_get_brightness (mp_obj_t self_in) {
433
433
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
434
- return mp_obj_new_float (self->Cosmic ->get_brightness ());
434
+ return mp_obj_new_float (self->cosmic ->get_brightness ());
435
435
}
436
436
437
437
extern mp_obj_t CosmicUnicorn_adjust_brightness (mp_obj_t self_in, mp_obj_t delta) {
438
438
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
439
- self->Cosmic ->adjust_brightness (mp_obj_get_float (delta));
439
+ self->cosmic ->adjust_brightness (mp_obj_get_float (delta));
440
440
return mp_const_none;
441
441
}
442
442
443
443
extern mp_obj_t CosmicUnicorn_set_volume (mp_obj_t self_in, mp_obj_t value) {
444
444
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
445
- self->Cosmic ->set_volume (mp_obj_get_float (value));
445
+ self->cosmic ->set_volume (mp_obj_get_float (value));
446
446
return mp_const_none;
447
447
}
448
448
449
449
extern mp_obj_t CosmicUnicorn_get_volume (mp_obj_t self_in) {
450
450
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
451
- return mp_obj_new_float (self->Cosmic ->get_volume ());
451
+ return mp_obj_new_float (self->cosmic ->get_volume ());
452
452
}
453
453
454
454
extern mp_obj_t CosmicUnicorn_adjust_volume (mp_obj_t self_in, mp_obj_t delta) {
455
455
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
456
- self->Cosmic ->adjust_volume (mp_obj_get_float (delta));
456
+ self->cosmic ->adjust_volume (mp_obj_get_float (delta));
457
457
return mp_const_none;
458
458
}
459
459
460
460
461
461
extern mp_obj_t CosmicUnicorn_light (mp_obj_t self_in) {
462
462
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
463
- return mp_obj_new_float (self->Cosmic ->light ());
463
+ return mp_obj_new_float (self->cosmic ->light ());
464
464
}
465
465
466
466
extern mp_obj_t CosmicUnicorn_is_pressed (mp_obj_t self_in, mp_obj_t button) {
467
467
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
468
- return mp_obj_new_bool (self->Cosmic ->is_pressed ((uint8_t )mp_obj_get_int (button)));
468
+ return mp_obj_new_bool (self->cosmic ->is_pressed ((uint8_t )mp_obj_get_int (button)));
469
469
}
470
470
471
471
extern mp_obj_t CosmicUnicorn_play_sample (mp_obj_t self_in, mp_obj_t data) {
@@ -477,21 +477,21 @@ extern mp_obj_t CosmicUnicorn_play_sample(mp_obj_t self_in, mp_obj_t data) {
477
477
mp_raise_ValueError (" Supplied buffer is too small!" );
478
478
}
479
479
480
- self->Cosmic ->play_sample ((uint8_t *)bufinfo.buf , bufinfo.len );
480
+ self->cosmic ->play_sample ((uint8_t *)bufinfo.buf , bufinfo.len );
481
481
482
482
return mp_const_none;
483
483
}
484
484
485
485
extern mp_obj_t CosmicUnicorn_play_synth (mp_obj_t self_in) {
486
486
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
487
- self->Cosmic ->play_synth ();
487
+ self->cosmic ->play_synth ();
488
488
489
489
return mp_const_none;
490
490
}
491
491
492
492
extern mp_obj_t CosmicUnicorn_stop_playing (mp_obj_t self_in) {
493
493
_CosmicUnicorn_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _CosmicUnicorn_obj_t);
494
- self->Cosmic ->stop_playing ();
494
+ self->cosmic ->stop_playing ();
495
495
496
496
return mp_const_none;
497
497
}
@@ -509,7 +509,7 @@ extern mp_obj_t CosmicUnicorn_synth_channel(mp_obj_t self_in, mp_obj_t channel_i
509
509
// Could very easily mess up in weird ways once object deletion is considered?
510
510
_Channel_obj_t *channel_obj = m_new_obj_with_finaliser (_Channel_obj_t);
511
511
channel_obj->base .type = &Channel_type;
512
- channel_obj->channel = &self->Cosmic ->synth_channel (channel);
512
+ channel_obj->channel = &self->cosmic ->synth_channel (channel);
513
513
514
514
return MP_OBJ_FROM_PTR (channel_obj);
515
515
}
0 commit comments