Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Fujix1 committed Sep 16, 2023
1 parent ecd61a0 commit 31cae52
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"bmp.h": "c",
"oledfont.h": "c",
"limits": "cpp"
}
},
"cmake.configureOnOpen": false
}
6 changes: 4 additions & 2 deletions src/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@ void s98Process() {

uint8_t addr;
uint8_t data;
s98info.Sync = 0;

if (timeUpdateFlag) {
startTime = get_timer_value();
Expand Down Expand Up @@ -1341,10 +1342,10 @@ void s98Process() {
s98info.Sync += 1;
break;
case 0xFE: { // n sync wait
data = get_vgm_ui8();
int s = 0, n = 0, i = 0;
do {
++i;
data = get_vgm_ui8();
n |= (data & 0x7f) << s;
s += 7;
} while (data & 0x80);
Expand Down Expand Up @@ -1373,7 +1374,8 @@ void s98Process() {
break;
}

if (s98info.Sync > 1) {

if (s98info.Sync > 0) {
while ((get_timer_value() - startTime) <= s98info.Sync * s98info.OneCycle) {
//if (s98info.Sync > 1) {
switch (Keypad.checkButton()) {
Expand Down
2 changes: 1 addition & 1 deletion src/keypad/keypad.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern "C" {
}
#include "tick.hpp"

#define BUTTON_INTERVAL 64 // ボタン取得間隔 ms
#define BUTTON_INTERVAL 100 // ボタン取得間隔 ms
#define REPEAT_DELAY 400 // ボタンリピート開始まで ms

typedef enum {
Expand Down
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ void setup() {

Tick.delay_ms(64);

LCD_ShowString(0, 0, (u8 *)("Initializing PT2257. "), WHITE);
PT2257.begin(); // PT2257 初期化

LCD_ShowString(0, 0, (u8 *)("Initializing SI5351. "), WHITE);
SI5351.begin(); // SI5351 起動
SI5351.setFreq(SI5351_8000, 0);
SI5351.setFreq(SI5351_3579, 1);
SI5351.enableOutputs(true);

LCD_ShowString(0, 0, (u8 *)("Initializing PT2257. "), WHITE);
PT2257.begin(); // PT2257 初期化

LCD_ShowString(0, 0, (u8 *)("Starting FM. "), WHITE);
FM.begin();
FM.reset(); // FMリセット
Expand Down

0 comments on commit 31cae52

Please sign in to comment.