Skip to content

Commit

Permalink
Update parameter of ADCDevice (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
sago35 authored Nov 20, 2024
1 parent cf3e06e commit 595a7e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions targets/sg48key/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ func run() error {
}

cont := true
x := NewADCDevice(ax, 0x2000, 0xDC00, true)
y := NewADCDevice(ay, 0x2400, 0xD400, true)
ticker := time.Tick(1 * time.Millisecond)
x := NewADCDevice(ax, 0x3000, 0xD000, true)
y := NewADCDevice(ay, 0x3000, 0xD000, true)
ticker := time.Tick(2 * time.Millisecond)
cnt := 0
for cont {
<-ticker
Expand All @@ -90,7 +90,7 @@ func run() error {
return err
}

if cnt%10 == 0 {
if cnt%5 == 0 {
xx := x.Get2()
yy := y.Get2()
//fmt.Printf("%04X %04X %4d %4d %4d %4d\n", x.RawValue, y.RawValue, xx, yy, x.Get(), y.Get())
Expand Down
4 changes: 2 additions & 2 deletions targets/sgh60/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func run() error {
}

cont := true
x := NewADCDevice(ax, 0x3400, 0xD400, true)
y := NewADCDevice(ay, 0x3800, 0xE990, true)
x := NewADCDevice(ax, 0x3000, 0xD000, true)
y := NewADCDevice(ay, 0x3000, 0xD000, true)
ticker := time.Tick(1 * time.Millisecond)
cnt := 0
for cont {
Expand Down

0 comments on commit 595a7e7

Please sign in to comment.