Skip to content

Commit aeae756

Browse files
committed
finished cleaning
1 parent a18545e commit aeae756

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

screen.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace microcode {
2121
Screen.WIDTH = Screen.image_.width
2222
Screen.HEIGHT = Screen.image_.height
2323
Screen.HALF_WIDTH = Screen.WIDTH >> 1
24-
Screen.HALF_HEIGHT = Screen.HEIGHT >> 1
24+
Screen.HALF_HEIGHT = Screen.HEIGHT >> 1
2525
Screen.LEFT_EDGE = -Screen.HALF_WIDTH
2626
Screen.RIGHT_EDGE = Screen.HALF_WIDTH
2727
Screen.TOP_EDGE = -Screen.HALF_HEIGHT
@@ -31,7 +31,7 @@ namespace microcode {
3131
top: Screen.TOP_EDGE,
3232
width: Screen.WIDTH,
3333
height: Screen.HEIGHT,
34-
})
34+
})
3535
}
3636

3737
public static x(v: number) {

tiles.ts

+14-10
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ namespace microcode {
117117

118118
export const TID_MODIFIER_SERVO_SET_ANGLE = "A21_"
119119

120-
121120
export const PAGE_IDS = [
122121
TID_MODIFIER_PAGE_1,
123122
TID_MODIFIER_PAGE_2,
@@ -325,7 +324,6 @@ namespace microcode {
325324
paint.jdParam2 = 5
326325
paint.defaultModifier = new IconEditor()
327326

328-
329327
const music = addActuator(TID_ACTUATOR_MUSIC, ["melody_editor", "loop"])
330328
music.priority = 11
331329

@@ -490,7 +488,7 @@ namespace microcode {
490488
addReadValue(TID_MODIFIER_CUP_X_READ, JdKind.Variable, 0)
491489
addReadValue(TID_MODIFIER_CUP_Y_READ, JdKind.Variable, 1)
492490
addReadValue(TID_MODIFIER_CUP_Z_READ, JdKind.Variable, 2)
493-
491+
494492
// TODO: this should only be present when radio receive in When section
495493
addReadValue(TID_MODIFIER_RADIO_VALUE, JdKind.RadioValue, 0)
496494

@@ -551,7 +549,9 @@ namespace microcode {
551549
super(TID_MODIFIER_ICON_EDITOR, "icon_editor", 10)
552550
this.firstInstance = false
553551
this.fieldEditor = iconFieldEditor
554-
this.field = this.fieldEditor.clone(field ? field : this.fieldEditor.init)
552+
this.field = this.fieldEditor.clone(
553+
field ? field : this.fieldEditor.init
554+
)
555555
this.jdKind = JdKind.ServiceCommandArg
556556
this.jdParam2 = 400 // ms
557557
}
@@ -588,14 +588,15 @@ namespace microcode {
588588
tempo: number
589589
}
590590

591-
592591
// notes are in reverse order of scale
593592
// - 7 = C
594593
// - 6 = D
595594
// - 5 = E. etc
596595
export const melodyFieldEditor: FieldEditor = {
597596
init: { notes: `76543210`, tempo: 120 },
598-
clone: (melody: Melody) => { return { notes: melody.notes.slice(0), tempo: melody.tempo } },
597+
clone: (melody: Melody) => {
598+
return { notes: melody.notes.slice(0), tempo: melody.tempo }
599+
},
599600
editor: melodyEditor,
600601
toImage: melodyToImage,
601602
buttonStyle: () => ButtonStyles.Transparent,
@@ -604,7 +605,7 @@ namespace microcode {
604605
const sp = s.split(",")
605606
return {
606607
notes: sp[0],
607-
tempo: parseInt(sp[1])
608+
tempo: parseInt(sp[1]),
608609
}
609610
},
610611
}
@@ -616,7 +617,9 @@ namespace microcode {
616617
super(TID_MODIFIER_MELODY_EDITOR, "melody_editor", 10)
617618
this.firstInstance = false
618619
this.fieldEditor = melodyFieldEditor
619-
this.field = this.fieldEditor.clone(field ? field : this.fieldEditor.init)
620+
this.field = this.fieldEditor.clone(
621+
field ? field : this.fieldEditor.init
622+
)
620623
this.jdKind = JdKind.ServiceCommandArg
621624
this.jdParam2 = 400 // ms
622625
}
@@ -632,7 +635,9 @@ namespace microcode {
632635
}
633636

634637
getNewInstance(field: any = null) {
635-
return new MelodyEditor(field ? field : this.fieldEditor.clone(this.field))
638+
return new MelodyEditor(
639+
field ? field : this.fieldEditor.clone(this.field)
640+
)
636641
}
637642

638643
serviceCommandArg() {
@@ -641,7 +646,6 @@ namespace microcode {
641646
}
642647
}
643648

644-
645649
function addFieldEditors() {
646650
const iconEditorTile = new IconEditor()
647651
iconEditorTile.firstInstance = true

0 commit comments

Comments
 (0)