Before rewrite
This commit is contained in:
@@ -28,7 +28,7 @@ class FSKWriter:
|
|||||||
self.space(1.0)
|
self.space(1.0)
|
||||||
|
|
||||||
def space(self, time:float = 0.03):
|
def space(self, time:float = 0.03):
|
||||||
self.samples.extend(b'\0'*int(time*self.sample_rate))
|
self.samples.extend(b'\0\0'*int(time*self.sample_rate))
|
||||||
|
|
||||||
def _tone(self, frequency: float, sample_count: int) -> None:
|
def _tone(self, frequency: float, sample_count: int) -> None:
|
||||||
phase_step = 2.0 * math.pi * frequency / self.sample_rate
|
phase_step = 2.0 * math.pi * frequency / self.sample_rate
|
||||||
@@ -75,7 +75,7 @@ class FSKWriter:
|
|||||||
l = len(data)
|
l = len(data)
|
||||||
self.byte(l>>8)
|
self.byte(l>>8)
|
||||||
self.byte(l&0xff)
|
self.byte(l&0xff)
|
||||||
self.samples.extend(b'\0'*int(self.samples_per_low*8))
|
#self.samples.extend(b'\0'*int(self.samples_per_low*8))
|
||||||
self.bytes(data)
|
self.bytes(data)
|
||||||
self.byte(self.chsum(data))
|
self.byte(self.chsum(data))
|
||||||
self.space(self.block_spacing)
|
self.space(self.block_spacing)
|
||||||
|
|||||||
@@ -414,10 +414,10 @@ read_block:
|
|||||||
ld (BLOCK_LENGTH),bc
|
ld (BLOCK_LENGTH),bc
|
||||||
|
|
||||||
; Check block length against max length
|
; Check block length against max length
|
||||||
ld hl,#MAX_BLOCK_SIZE
|
;ld hl,#MAX_BLOCK_SIZE
|
||||||
and a,a
|
;and a,a
|
||||||
sbc hl, bc
|
;sbc hl, bc
|
||||||
jp c,error_block_too_big
|
;jp c,error_block_too_big
|
||||||
|
|
||||||
exx
|
exx
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user