From 90446bcce262b938eebc37477cecac5ee7dc2eaa Mon Sep 17 00:00:00 2001 From: occheung Date: Mon, 28 Sep 2020 14:13:32 +0800 Subject: [PATCH] dds: fix tab --- src/dds.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dds.rs b/src/dds.rs index 29f2d5c..3e85ce5 100644 --- a/src/dds.rs +++ b/src/dds.rs @@ -524,7 +524,7 @@ where } /* - * Configure a RAM mode profile, wrt supplied amplitude data + * Configure a RAM mode profile, wrt supplied amplitude data * This will setup the static RAM_VEC by converting amplitude to asf */ pub unsafe fn set_amplitude_ram_profile(&mut self, profile: u8, start_addr: u16, end_addr: u16, @@ -583,13 +583,13 @@ where // Convert phase data into bytes recognized by DDS for deg in phase_data.iter() { let pow = self.degree_to_pow(*deg); - RAM_VEC.push(((pow >> 8) & 0xFF) as u8) + RAM_VEC.push(((pow >> 8) & 0xFF) as u8) .map_err(|_| Error::DDSRAMError)?; - RAM_VEC.push(((pow >> 0) & 0xFF) as u8) + RAM_VEC.push(((pow >> 0) & 0xFF) as u8) .map_err(|_| Error::DDSRAMError)?; - RAM_VEC.push(0) + RAM_VEC.push(0) .map_err(|_| Error::DDSRAMError)?; - RAM_VEC.push(0) + RAM_VEC.push(0) .map_err(|_| Error::DDSRAMError)?; } @@ -665,9 +665,9 @@ where // Return DDS RAM Error if it does not fix into the RAM let span = upper_boundary - lower_boundary; let data_size = if core::intrinsics::roundf64(span/f_resolution) == (span/f_resolution) { - (span/f_resolution) as u64 + 1 + (span/f_resolution) as u64 + 1 } else { - (span/f_resolution) as u64 + (span/f_resolution) as u64 }; let ram_size = data_size * duplication;