Merge pull request #55 from gwilymk/fix-incorrect-sound-definition

Sweep works backwards
This commit is contained in:
Corwin 2021-06-05 22:58:18 +01:00 committed by GitHub
commit cc70e5ba8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,7 @@ impl SweepSettings {
fn as_bits(&self) -> u16 { fn as_bits(&self) -> u16 {
((self.number_of_sweep_shifts as u16) & 0b111) ((self.number_of_sweep_shifts as u16) & 0b111)
| (self.sound_direction.as_bits() << 3) | ((1 - self.sound_direction.as_bits()) << 3) // sweep works backwards
| ((self.sweep_time as u16) & 0b111) << 4 | ((self.sweep_time as u16) & 0b111) << 4
} }
} }