Skip to content

Commit d6f513d

Browse files
committed
Tentative, re-sending kit params should likely not be needed anymore.
1 parent 17fd3df commit d6f513d

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

build/manifest.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ version_code = 4070
2222
commit = 3632bb87
2323
filename = mcl_4_7_0.uf2
2424

25+
[avr]
26+
checksum = 0x928c
27+
size = 245450
28+
version_string = 4.70
29+
version_code = 4070
30+
commit = 17fd3df8
31+
filename = mcl_4_7_0.hex
32+

src/mcl/MCL/MDSeqTrack.cpp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -591,24 +591,16 @@ void MDSeqTrack::reset_params() {
591591
//notes.prog = MD.kit.params[track_number][20];
592592
//process_note_locks(20, MD.kit.params[track_number][20],ccs);
593593
send_notes_ccs(ccs, send_ccs);
594-
} else {
594+
}
595+
#if defined(__AVR__)
596+
else {
597+
//Ugly hack, removing this section of code causes the avr compiler to bloat
598+
if (track_number < 255) { return; }
595599
MDTrack md_track;
596600
md_track.get_machine_from_kit(track_number);
597601
MD.assignMachineBulk(track_number, &md_track.machine, 255, 1, true);
598602
}
599-
600-
/*
601-
for (uint8_t c = 0; c < NUM_LOCKS; c++) {
602-
bool send = false;
603-
uint8_t send_param;
604-
if (locks_params[c]) {
605-
uint8_t p = locks_params[c] - 1;
606-
uint8_t send_param = MD.kit.params[track_number][p];
607-
bool update_kit = false;
608-
MD.setTrackParam_inline(track_number, p, send_param, uart, update_kit);
609-
}
610-
}
611-
*/
603+
#endif
612604
}
613605

614606
void MDSeqTrack::get_step_locks(uint8_t step, uint8_t *params,

src/mcl/MD/MD.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ void MDClass::setMuteGroup(uint8_t srcTrack, uint8_t muteTrack) {
630630
sendRequest(data, countof(data));
631631
}
632632

633-
void MDClass::assignMachine(uint8_t track, uint8_t model, uint8_t init) {
633+
__attribute__((noinline)) void MDClass::assignMachine(uint8_t track, uint8_t model, uint8_t init) {
634634
uint8_t send_length = 5;
635635
if (init == 255) {
636636
send_length = 4;
@@ -681,7 +681,7 @@ void MDClass::setMachine(uint8_t track, MDMachine *machine) {
681681
// uart->useRunningStatus = false;
682682
}
683683

684-
uint8_t MDClass::assignMachineBulk(uint8_t track, MDMachine *machine,
684+
__attribute__((noinline)) uint8_t MDClass::assignMachineBulk(uint8_t track, MDMachine *machine,
685685
uint8_t level, uint8_t mode, bool send) {
686686

687687
DEBUG_PRINT("assign machine bulk: ");

src/mcl/MD/MD.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class MDClass : public ElektronDevice {
243243
* Send a sysex machine to change the model of the machine on the given track.
244244
**/
245245
void assignMachine(uint8_t track, uint8_t model, uint8_t init = 255);
246-
uint8_t assignMachineBulk(uint8_t track, MDMachine *machine, uint8_t send_level, uint8_t mode = 255, bool send = true);
246+
__attribute__((noinline)) uint8_t assignMachineBulk(uint8_t track, MDMachine *machine, uint8_t send_level, uint8_t mode = 255, bool send = true);
247247
/**
248248
* Load the given machine (including parameters) on the given track
249249
* out of the machine structure.

0 commit comments

Comments
 (0)