Commit graph

136 commits

Author SHA1 Message Date
b650a78743
fix checkout path of the ci scripts 2022-02-11 12:59:02 -06:00
1587684f3e
examples: reformat all with ctrl-t in arduino ide 2022-02-11 09:42:38 -06:00
a71f107556
greaseweazel: improve index pulse recording
ripping with genuine GW hardware, a typical track is read in
to gw as
```
Flux: 72.00 MHz
 Total: 232202 samples, 594.17ms
 Revolution 0: 93.06ms
 Revolution 1: 166.87ms
 Revolution 2: 166.87ms
 Revolution 3: 166.87ms
```

our firmware came in as
```
Flux: 24.00 MHz
 Total: 120485 samples, 652.35ms
 Revolution 0: 0.00ms
 Revolution 1: 162.34ms
 Revolution 2: 55.11ms
 Revolution 3: 162.17ms
 Revolution 4: 55.28ms
 Revolution 5: 162.12ms
```
Notice how there's an empty revolution 0 and a partial revolution
2 & 4.

It appears that
 * if capture_ms is 0, nothing is captured after the index
   (rather than 50ms)
 * no index is emitted at the start (though this is because
   the first revolution is almost always a partial revolution)

Now after this change, a track on rp2040 looks like
```
Flux: 24.00 MHz
 Total: 96498 samples, 502.46ms
 Revolution 0: 0.00ms
 Revolution 1: 167.49ms
 Revolution 2: 167.49ms
 Revolution 3: 167.49ms
```
which appears to be closer to what gw expects; it also fixes how
g64conv used to require `r1` to select a particular revolution.
This may have been because it defaulted to one of the 'runt'
revolutions, which also made it misestimate the rotational speed
of the drive.
2022-02-10 20:05:04 -06:00
87785ae5ff
rp2040: move index handling out of pio, correct falling_index_offset 2022-02-10 19:59:35 -06:00
cd0c08142e
Let's upload some artifacts 2022-02-10 13:18:35 -06:00
d18495d298
Remmove F_CPU warnings, they are irrelevant now 2022-02-10 09:53:46 -06:00
311c7798fb
GW firmware is unreliable unless Adafruit TinyUSB is used 2022-02-10 09:50:19 -06:00
a400e0b8e2
remove standalone mfm test program, is no longer needed 2022-02-09 17:49:25 -06:00
178792a525
Fix greaseunpack for 2-byte codes
it was off by 250.
2022-02-09 17:48:38 -06:00
c78b45ba9d
Remove some debug printing
.. this caused a problem when the flux bins were >512, I think.
2022-02-09 17:48:18 -06:00
b7754468c5
remove unused wait_index, stop_index 2022-02-09 16:47:19 -06:00
67bc164530
fix header 2022-02-09 16:47:10 -06:00
43e02a5545
no more mhz warning for rp2040 2022-02-09 16:46:59 -06:00
e4a29020be
Fix capture
.. after awhile it would run out of program space, because
it was not freeing the right program.

also add support for terminating a read after a given number
of ms, or 50ms after the second index pulse.
2022-02-09 13:45:06 -06:00
lady ada
0908c92ab5 fix 0 revs is 0 revs 2022-02-08 18:16:15 -05:00
46166ace07
mark functions as private to quiet doxygen 2022-02-08 16:47:53 -06:00
ef7eca9d02
Merge remote-tracking branch 'origin/samd51_capturetimer' into samd51_capturetimer 2022-02-08 16:42:50 -06:00
afe73d8039
rp2040: implement flux writing
This nearly works with fluxengine (slightly older revision):
```
$ ./fluxengine write ibm1440  -i bloop.img  --usb.serial=...
Measuring rotational speed... 200ms
Writing to: drive 0
  0.0: Write:   199 ms in 76988 bytes
       Verify:  391 ms in 150010 bytes
  0.1: Write:   199 ms in 92225 bytes
       Verify:  326 ms in 150006 bytes
  1.0: Write:   199 ms in 79272 bytes
       Verify:  380 ms in 150002 bytes
```
but at some point, the fw and fluxengine stop successfully
talking:
```
Measuring rotational speed... 200ms
Writing to: drive 0
  0.0: Write:   199 ms in 76988 bytes
       Verify:  391 ms in 150010 bytes
  0.1: Write:   199 ms in 92225 bytes
       Verify:  326 ms in 150006 bytes
  1.0: Write:   199 ms in 79272 bytes
       Verify:  380 ms in 150002 bytes
```
2022-02-08 16:42:46 -06:00
lady ada
7db1daa364 some doxyclang 2022-02-08 12:01:14 -05:00
lady ada
b41052ba75 Merge branch 'samd51_capturetimer' of github.com:adafruit/Adafruit_Floppy into samd51_capturetimer 2022-02-08 11:41:11 -05:00
lady ada
4d062e5244 allow writing long fluxes, fix for 'capture by time not revs' 2022-02-08 11:41:05 -05:00
fefdb6667e
run clang-format 2022-02-07 21:25:58 -06:00
6e614e6043
fix capture and do proper greaseweazel flux packing on samd51 reading 2022-02-07 21:09:49 -06:00
10eb2fd3cc
run clang-format 2022-02-07 20:44:20 -06:00
85e0106965
Fix write_track for rp2040 (but timings are likely wrong) 2022-02-07 20:43:55 -06:00
5a2fea5616
Make samd51 work again with sampled flux 2022-02-07 20:40:21 -06:00
4aebea3518
convert mfm to use pio on rp2040 2022-02-07 20:12:14 -06:00
lady ada
d374cf6500 we handle packed bytes 2022-02-07 20:16:51 -05:00
lady ada
9037df8f75 write 2022-02-06 18:39:59 -05:00
lady ada
a381e34486 can read and write now 2022-02-06 18:36:55 -05:00
lady ada
72dc40889e start adding writing - but also make sure that if read and write use the same timer we dont stomp all over the place by deiniting and cleaning up after a track capture 2022-02-05 23:37:31 -05:00
lady ada
c747af3a87 avoid infinite loop 2022-02-05 22:53:57 -05:00
lady ada
5a467596b8 Merge branch 'samd51_capturetimer' of github.com:adafruit/Adafruit_Floppy into samd51_capturetimer 2022-02-05 22:24:33 -05:00
lady ada
39fdddc976 add gw timing for print debug 2022-02-05 22:24:27 -05:00
a07ac41c11
fix samd51 build 2022-02-04 13:23:14 -06:00
f25c9afc82
run clang-format 2022-02-04 13:18:27 -06:00
24e8ea588f
ignore ci-arduino if it exists 2022-02-04 13:18:10 -06:00
9aeee24ab8
No need to overclock for flux reading anymore :) 2022-02-04 13:16:40 -06:00
235c2f1923
Implement rp2040 pio reading & reorganize 2022-02-04 13:16:34 -06:00
lady ada
b0b9ad9286 doxyfile 2022-01-25 17:06:09 -05:00
lady ada
b16fb7f0b7 doxyclang 2022-01-25 17:04:19 -05:00
lady ada
9c744073ad clang 2022-01-25 16:56:44 -05:00
lady ada
91c3428671 store in gw format if desired 2022-01-25 16:51:13 -05:00
lady ada
61b5fad6fe dont trim pulses, we pre-encode in gw format 2022-01-25 16:45:48 -05:00
lady ada
35f3a884f5 deal with long pulses 2022-01-25 16:35:03 -05:00
lady ada
bd9e17f012 readd timeout but make it 10 seconds. also check that we could init the pins 2022-01-25 13:31:10 -05:00
lady ada
bd06c2f941 moreclang 2022-01-25 11:53:52 -05:00
lady ada
9a790cc7c9 24 mhz sample rate should be enough for anyone 2022-01-25 11:44:33 -05:00
lady ada
5fcedf8935 fix xample 2022-01-25 11:44:16 -05:00
lady ada
1e07c6be94 readd the writeflux stuff, packing the indexop in the flux stream 2022-01-25 11:30:32 -05:00