Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions generator/sbpg/targets/haskell.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
'u16': 'getWord16le',
'u32': 'getWord32le',
'u64': 'getWord64le',
's8': 'fromIntegral <$> getWord8',
's16': 'fromIntegral <$> getWord16le',
's32': 'fromIntegral <$> getWord32le',
's64': 'fromIntegral <$> getWord64le',
's8': '(fromIntegral <$> getWord8)',
's16': '(fromIntegral <$> getWord16le)',
's32': '(fromIntegral <$> getWord32le)',
's64': '(fromIntegral <$> getWord64le)',
'float': 'getFloat32le',
'double': 'getFloat64le',
}
Expand Down
12 changes: 6 additions & 6 deletions haskell/src/SwiftNav/SBP/Acquisition.hs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ instance Binary AcqSvProfile where
_acqSvProfile_bin_width <- getWord16le
_acqSvProfile_timestamp <- getWord32le
_acqSvProfile_time_spent <- getWord32le
_acqSvProfile_cf_min <- fromIntegral <$> getWord32le
_acqSvProfile_cf_max <- fromIntegral <$> getWord32le
_acqSvProfile_cf <- fromIntegral <$> getWord32le
_acqSvProfile_cf_min <- (fromIntegral <$> getWord32le)
_acqSvProfile_cf_max <- (fromIntegral <$> getWord32le)
_acqSvProfile_cf <- (fromIntegral <$> getWord32le)
_acqSvProfile_cp <- getWord32le
pure AcqSvProfile {..}

Expand Down Expand Up @@ -287,9 +287,9 @@ instance Binary AcqSvProfileDep where
_acqSvProfileDep_bin_width <- getWord16le
_acqSvProfileDep_timestamp <- getWord32le
_acqSvProfileDep_time_spent <- getWord32le
_acqSvProfileDep_cf_min <- fromIntegral <$> getWord32le
_acqSvProfileDep_cf_max <- fromIntegral <$> getWord32le
_acqSvProfileDep_cf <- fromIntegral <$> getWord32le
_acqSvProfileDep_cf_min <- (fromIntegral <$> getWord32le)
_acqSvProfileDep_cf_max <- (fromIntegral <$> getWord32le)
_acqSvProfileDep_cf <- (fromIntegral <$> getWord32le)
_acqSvProfileDep_cp <- getWord32le
pure AcqSvProfileDep {..}

Expand Down
2 changes: 1 addition & 1 deletion haskell/src/SwiftNav/SBP/ExtEvents.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ instance Binary MsgExtEvent where
get = do
_msgExtEvent_wn <- getWord16le
_msgExtEvent_tow <- getWord32le
_msgExtEvent_ns_residual <- fromIntegral <$> getWord32le
_msgExtEvent_ns_residual <- (fromIntegral <$> getWord32le)
_msgExtEvent_flags <- getWord8
_msgExtEvent_pin <- getWord8
pure MsgExtEvent {..}
Expand Down
4 changes: 2 additions & 2 deletions haskell/src/SwiftNav/SBP/Gnss.hs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ data GpsTime = GpsTime
instance Binary GpsTime where
get = do
_gpsTime_tow <- getWord32le
_gpsTime_ns_residual <- fromIntegral <$> getWord32le
_gpsTime_ns_residual <- (fromIntegral <$> getWord32le)
_gpsTime_wn <- getWord16le
pure GpsTime {..}

Expand All @@ -204,7 +204,7 @@ data CarrierPhase = CarrierPhase

instance Binary CarrierPhase where
get = do
_carrierPhase_i <- fromIntegral <$> getWord32le
_carrierPhase_i <- (fromIntegral <$> getWord32le)
_carrierPhase_f <- getWord8
pure CarrierPhase {..}

Expand Down
14 changes: 7 additions & 7 deletions haskell/src/SwiftNav/SBP/Imu.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ instance Binary MsgImuRaw where
get = do
_msgImuRaw_tow <- getWord32le
_msgImuRaw_tow_f <- getWord8
_msgImuRaw_acc_x <- fromIntegral <$> getWord16le
_msgImuRaw_acc_y <- fromIntegral <$> getWord16le
_msgImuRaw_acc_z <- fromIntegral <$> getWord16le
_msgImuRaw_gyr_x <- fromIntegral <$> getWord16le
_msgImuRaw_gyr_y <- fromIntegral <$> getWord16le
_msgImuRaw_gyr_z <- fromIntegral <$> getWord16le
_msgImuRaw_acc_x <- (fromIntegral <$> getWord16le)
_msgImuRaw_acc_y <- (fromIntegral <$> getWord16le)
_msgImuRaw_acc_z <- (fromIntegral <$> getWord16le)
_msgImuRaw_gyr_x <- (fromIntegral <$> getWord16le)
_msgImuRaw_gyr_y <- (fromIntegral <$> getWord16le)
_msgImuRaw_gyr_z <- (fromIntegral <$> getWord16le)
pure MsgImuRaw {..}

put MsgImuRaw {..} = do
Expand Down Expand Up @@ -111,7 +111,7 @@ data MsgImuAux = MsgImuAux
instance Binary MsgImuAux where
get = do
_msgImuAux_imu_type <- getWord8
_msgImuAux_temp <- fromIntegral <$> getWord16le
_msgImuAux_temp <- (fromIntegral <$> getWord16le)
_msgImuAux_imu_conf <- getWord8
pure MsgImuAux {..}

Expand Down
6 changes: 3 additions & 3 deletions haskell/src/SwiftNav/SBP/Mag.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ instance Binary MsgMagRaw where
get = do
_msgMagRaw_tow <- getWord32le
_msgMagRaw_tow_f <- getWord8
_msgMagRaw_mag_x <- fromIntegral <$> getWord16le
_msgMagRaw_mag_y <- fromIntegral <$> getWord16le
_msgMagRaw_mag_z <- fromIntegral <$> getWord16le
_msgMagRaw_mag_x <- (fromIntegral <$> getWord16le)
_msgMagRaw_mag_y <- (fromIntegral <$> getWord16le)
_msgMagRaw_mag_z <- (fromIntegral <$> getWord16le)
pure MsgMagRaw {..}

put MsgMagRaw {..} = do
Expand Down
94 changes: 47 additions & 47 deletions haskell/src/SwiftNav/SBP/Navigation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ instance Binary MsgGpsTime where
get = do
_msgGpsTime_wn <- getWord16le
_msgGpsTime_tow <- getWord32le
_msgGpsTime_ns_residual <- fromIntegral <$> getWord32le
_msgGpsTime_ns_residual <- (fromIntegral <$> getWord32le)
_msgGpsTime_flags <- getWord8
pure MsgGpsTime {..}

Expand Down Expand Up @@ -487,9 +487,9 @@ data MsgBaselineEcef = MsgBaselineEcef
instance Binary MsgBaselineEcef where
get = do
_msgBaselineEcef_tow <- getWord32le
_msgBaselineEcef_x <- fromIntegral <$> getWord32le
_msgBaselineEcef_y <- fromIntegral <$> getWord32le
_msgBaselineEcef_z <- fromIntegral <$> getWord32le
_msgBaselineEcef_x <- (fromIntegral <$> getWord32le)
_msgBaselineEcef_y <- (fromIntegral <$> getWord32le)
_msgBaselineEcef_z <- (fromIntegral <$> getWord32le)
_msgBaselineEcef_accuracy <- getWord16le
_msgBaselineEcef_n_sats <- getWord8
_msgBaselineEcef_flags <- getWord8
Expand Down Expand Up @@ -541,9 +541,9 @@ data MsgBaselineNed = MsgBaselineNed
instance Binary MsgBaselineNed where
get = do
_msgBaselineNed_tow <- getWord32le
_msgBaselineNed_n <- fromIntegral <$> getWord32le
_msgBaselineNed_e <- fromIntegral <$> getWord32le
_msgBaselineNed_d <- fromIntegral <$> getWord32le
_msgBaselineNed_n <- (fromIntegral <$> getWord32le)
_msgBaselineNed_e <- (fromIntegral <$> getWord32le)
_msgBaselineNed_d <- (fromIntegral <$> getWord32le)
_msgBaselineNed_h_accuracy <- getWord16le
_msgBaselineNed_v_accuracy <- getWord16le
_msgBaselineNed_n_sats <- getWord8
Expand Down Expand Up @@ -592,9 +592,9 @@ data MsgVelEcef = MsgVelEcef
instance Binary MsgVelEcef where
get = do
_msgVelEcef_tow <- getWord32le
_msgVelEcef_x <- fromIntegral <$> getWord32le
_msgVelEcef_y <- fromIntegral <$> getWord32le
_msgVelEcef_z <- fromIntegral <$> getWord32le
_msgVelEcef_x <- (fromIntegral <$> getWord32le)
_msgVelEcef_y <- (fromIntegral <$> getWord32le)
_msgVelEcef_z <- (fromIntegral <$> getWord32le)
_msgVelEcef_accuracy <- getWord16le
_msgVelEcef_n_sats <- getWord8
_msgVelEcef_flags <- getWord8
Expand Down Expand Up @@ -651,9 +651,9 @@ data MsgVelEcefCov = MsgVelEcefCov
instance Binary MsgVelEcefCov where
get = do
_msgVelEcefCov_tow <- getWord32le
_msgVelEcefCov_x <- fromIntegral <$> getWord32le
_msgVelEcefCov_y <- fromIntegral <$> getWord32le
_msgVelEcefCov_z <- fromIntegral <$> getWord32le
_msgVelEcefCov_x <- (fromIntegral <$> getWord32le)
_msgVelEcefCov_y <- (fromIntegral <$> getWord32le)
_msgVelEcefCov_z <- (fromIntegral <$> getWord32le)
_msgVelEcefCov_cov_x_x <- getFloat32le
_msgVelEcefCov_cov_x_y <- getFloat32le
_msgVelEcefCov_cov_x_z <- getFloat32le
Expand Down Expand Up @@ -713,9 +713,9 @@ data MsgVelNed = MsgVelNed
instance Binary MsgVelNed where
get = do
_msgVelNed_tow <- getWord32le
_msgVelNed_n <- fromIntegral <$> getWord32le
_msgVelNed_e <- fromIntegral <$> getWord32le
_msgVelNed_d <- fromIntegral <$> getWord32le
_msgVelNed_n <- (fromIntegral <$> getWord32le)
_msgVelNed_e <- (fromIntegral <$> getWord32le)
_msgVelNed_d <- (fromIntegral <$> getWord32le)
_msgVelNed_h_accuracy <- getWord16le
_msgVelNed_v_accuracy <- getWord16le
_msgVelNed_n_sats <- getWord8
Expand Down Expand Up @@ -777,9 +777,9 @@ data MsgVelNedCov = MsgVelNedCov
instance Binary MsgVelNedCov where
get = do
_msgVelNedCov_tow <- getWord32le
_msgVelNedCov_n <- fromIntegral <$> getWord32le
_msgVelNedCov_e <- fromIntegral <$> getWord32le
_msgVelNedCov_d <- fromIntegral <$> getWord32le
_msgVelNedCov_n <- (fromIntegral <$> getWord32le)
_msgVelNedCov_e <- (fromIntegral <$> getWord32le)
_msgVelNedCov_d <- (fromIntegral <$> getWord32le)
_msgVelNedCov_cov_n_n <- getFloat32le
_msgVelNedCov_cov_n_e <- getFloat32le
_msgVelNedCov_cov_n_d <- getFloat32le
Expand Down Expand Up @@ -1094,9 +1094,9 @@ data MsgVelEcefGnss = MsgVelEcefGnss
instance Binary MsgVelEcefGnss where
get = do
_msgVelEcefGnss_tow <- getWord32le
_msgVelEcefGnss_x <- fromIntegral <$> getWord32le
_msgVelEcefGnss_y <- fromIntegral <$> getWord32le
_msgVelEcefGnss_z <- fromIntegral <$> getWord32le
_msgVelEcefGnss_x <- (fromIntegral <$> getWord32le)
_msgVelEcefGnss_y <- (fromIntegral <$> getWord32le)
_msgVelEcefGnss_z <- (fromIntegral <$> getWord32le)
_msgVelEcefGnss_accuracy <- getWord16le
_msgVelEcefGnss_n_sats <- getWord8
_msgVelEcefGnss_flags <- getWord8
Expand Down Expand Up @@ -1153,9 +1153,9 @@ data MsgVelEcefCovGnss = MsgVelEcefCovGnss
instance Binary MsgVelEcefCovGnss where
get = do
_msgVelEcefCovGnss_tow <- getWord32le
_msgVelEcefCovGnss_x <- fromIntegral <$> getWord32le
_msgVelEcefCovGnss_y <- fromIntegral <$> getWord32le
_msgVelEcefCovGnss_z <- fromIntegral <$> getWord32le
_msgVelEcefCovGnss_x <- (fromIntegral <$> getWord32le)
_msgVelEcefCovGnss_y <- (fromIntegral <$> getWord32le)
_msgVelEcefCovGnss_z <- (fromIntegral <$> getWord32le)
_msgVelEcefCovGnss_cov_x_x <- getFloat32le
_msgVelEcefCovGnss_cov_x_y <- getFloat32le
_msgVelEcefCovGnss_cov_x_z <- getFloat32le
Expand Down Expand Up @@ -1215,9 +1215,9 @@ data MsgVelNedGnss = MsgVelNedGnss
instance Binary MsgVelNedGnss where
get = do
_msgVelNedGnss_tow <- getWord32le
_msgVelNedGnss_n <- fromIntegral <$> getWord32le
_msgVelNedGnss_e <- fromIntegral <$> getWord32le
_msgVelNedGnss_d <- fromIntegral <$> getWord32le
_msgVelNedGnss_n <- (fromIntegral <$> getWord32le)
_msgVelNedGnss_e <- (fromIntegral <$> getWord32le)
_msgVelNedGnss_d <- (fromIntegral <$> getWord32le)
_msgVelNedGnss_h_accuracy <- getWord16le
_msgVelNedGnss_v_accuracy <- getWord16le
_msgVelNedGnss_n_sats <- getWord8
Expand Down Expand Up @@ -1279,9 +1279,9 @@ data MsgVelNedCovGnss = MsgVelNedCovGnss
instance Binary MsgVelNedCovGnss where
get = do
_msgVelNedCovGnss_tow <- getWord32le
_msgVelNedCovGnss_n <- fromIntegral <$> getWord32le
_msgVelNedCovGnss_e <- fromIntegral <$> getWord32le
_msgVelNedCovGnss_d <- fromIntegral <$> getWord32le
_msgVelNedCovGnss_n <- (fromIntegral <$> getWord32le)
_msgVelNedCovGnss_e <- (fromIntegral <$> getWord32le)
_msgVelNedCovGnss_d <- (fromIntegral <$> getWord32le)
_msgVelNedCovGnss_cov_n_n <- getFloat32le
_msgVelNedCovGnss_cov_n_e <- getFloat32le
_msgVelNedCovGnss_cov_n_d <- getFloat32le
Expand Down Expand Up @@ -1354,9 +1354,9 @@ data MsgVelBody = MsgVelBody
instance Binary MsgVelBody where
get = do
_msgVelBody_tow <- getWord32le
_msgVelBody_x <- fromIntegral <$> getWord32le
_msgVelBody_y <- fromIntegral <$> getWord32le
_msgVelBody_z <- fromIntegral <$> getWord32le
_msgVelBody_x <- (fromIntegral <$> getWord32le)
_msgVelBody_y <- (fromIntegral <$> getWord32le)
_msgVelBody_z <- (fromIntegral <$> getWord32le)
_msgVelBody_cov_x_x <- getFloat32le
_msgVelBody_cov_x_y <- getFloat32le
_msgVelBody_cov_x_z <- getFloat32le
Expand Down Expand Up @@ -1443,7 +1443,7 @@ instance Binary MsgGpsTimeDepA where
get = do
_msgGpsTimeDepA_wn <- getWord16le
_msgGpsTimeDepA_tow <- getWord32le
_msgGpsTimeDepA_ns_residual <- fromIntegral <$> getWord32le
_msgGpsTimeDepA_ns_residual <- (fromIntegral <$> getWord32le)
_msgGpsTimeDepA_flags <- getWord8
pure MsgGpsTimeDepA {..}

Expand Down Expand Up @@ -1640,9 +1640,9 @@ data MsgBaselineEcefDepA = MsgBaselineEcefDepA
instance Binary MsgBaselineEcefDepA where
get = do
_msgBaselineEcefDepA_tow <- getWord32le
_msgBaselineEcefDepA_x <- fromIntegral <$> getWord32le
_msgBaselineEcefDepA_y <- fromIntegral <$> getWord32le
_msgBaselineEcefDepA_z <- fromIntegral <$> getWord32le
_msgBaselineEcefDepA_x <- (fromIntegral <$> getWord32le)
_msgBaselineEcefDepA_y <- (fromIntegral <$> getWord32le)
_msgBaselineEcefDepA_z <- (fromIntegral <$> getWord32le)
_msgBaselineEcefDepA_accuracy <- getWord16le
_msgBaselineEcefDepA_n_sats <- getWord8
_msgBaselineEcefDepA_flags <- getWord8
Expand Down Expand Up @@ -1694,9 +1694,9 @@ data MsgBaselineNedDepA = MsgBaselineNedDepA
instance Binary MsgBaselineNedDepA where
get = do
_msgBaselineNedDepA_tow <- getWord32le
_msgBaselineNedDepA_n <- fromIntegral <$> getWord32le
_msgBaselineNedDepA_e <- fromIntegral <$> getWord32le
_msgBaselineNedDepA_d <- fromIntegral <$> getWord32le
_msgBaselineNedDepA_n <- (fromIntegral <$> getWord32le)
_msgBaselineNedDepA_e <- (fromIntegral <$> getWord32le)
_msgBaselineNedDepA_d <- (fromIntegral <$> getWord32le)
_msgBaselineNedDepA_h_accuracy <- getWord16le
_msgBaselineNedDepA_v_accuracy <- getWord16le
_msgBaselineNedDepA_n_sats <- getWord8
Expand Down Expand Up @@ -1745,9 +1745,9 @@ data MsgVelEcefDepA = MsgVelEcefDepA
instance Binary MsgVelEcefDepA where
get = do
_msgVelEcefDepA_tow <- getWord32le
_msgVelEcefDepA_x <- fromIntegral <$> getWord32le
_msgVelEcefDepA_y <- fromIntegral <$> getWord32le
_msgVelEcefDepA_z <- fromIntegral <$> getWord32le
_msgVelEcefDepA_x <- (fromIntegral <$> getWord32le)
_msgVelEcefDepA_y <- (fromIntegral <$> getWord32le)
_msgVelEcefDepA_z <- (fromIntegral <$> getWord32le)
_msgVelEcefDepA_accuracy <- getWord16le
_msgVelEcefDepA_n_sats <- getWord8
_msgVelEcefDepA_flags <- getWord8
Expand Down Expand Up @@ -1797,9 +1797,9 @@ data MsgVelNedDepA = MsgVelNedDepA
instance Binary MsgVelNedDepA where
get = do
_msgVelNedDepA_tow <- getWord32le
_msgVelNedDepA_n <- fromIntegral <$> getWord32le
_msgVelNedDepA_e <- fromIntegral <$> getWord32le
_msgVelNedDepA_d <- fromIntegral <$> getWord32le
_msgVelNedDepA_n <- (fromIntegral <$> getWord32le)
_msgVelNedDepA_e <- (fromIntegral <$> getWord32le)
_msgVelNedDepA_d <- (fromIntegral <$> getWord32le)
_msgVelNedDepA_h_accuracy <- getWord16le
_msgVelNedDepA_v_accuracy <- getWord16le
_msgVelNedDepA_n_sats <- getWord8
Expand Down
Loading