Permalink
Browse files

Code improvements by HLint.

  • Loading branch information...
1 parent 2d56fca commit 2366f67a352bfea85a742765b976ddb3a303be18 @mitar committed Nov 10, 2010
Showing with 69 additions and 111 deletions.
  1. +6 −6 lib/BluetoothUtils.hs
  2. +1 −1 lib/Compass.hs
  3. +54 −96 lib/NXT.hs
  4. +1 −1 lib/Types.hs
  5. +5 −5 lib/UltrasonicSensor.hs
  6. +2 −2 src/UploadFile.hs
View
@@ -39,9 +39,9 @@ bluetoothRSSIAddr addr = do
let ret' = fromIntegral ret
case ret' of
_ | ret' == blueError -> error "Could not get connection's RSSI"
- _ | ret' == blueNotConnected -> error "Connection not established"
- _ | ret' == blueNotSupported -> error "Not supported on this system"
- _ | otherwise -> return ret'
+ | ret' == blueNotConnected -> error "Connection not established"
+ | ret' == blueNotSupported -> error "Not supported on this system"
+ | otherwise -> return ret'
bluetoothLinkQuality :: NXT Int
bluetoothLinkQuality = do
@@ -54,9 +54,9 @@ bluetoothLinkQualityAddr addr = do
let ret' = fromIntegral ret
case ret' of
_ | ret' == blueError -> error "Could not get connection's link quality"
- _ | ret' == blueNotConnected -> error "Connection not established"
- _ | ret' == blueNotSupported -> error "Not supported on this system"
- _ | otherwise -> return ret'
+ | ret' == blueNotConnected -> error "Connection not established"
+ | ret' == blueNotSupported -> error "Not supported on this system"
+ | otherwise -> return ret'
bluetoothAddress :: NXT BTAddress
bluetoothAddress = do
View
@@ -68,7 +68,7 @@ csGetSensorType input = csReadString input 0x10 8
-- Configuration
csSetMode :: InputPort -> Mode -> NXT ()
-csSetMode input mode = do
+csSetMode input mode =
lowspeedWriteConfirm input 0 $ [deviceAddress, 0x41] ++ command
where command = case mode of
AutoTrigOn -> [0x41, 0x02]
Oops, something went wrong.

0 comments on commit 2366f67

Please sign in to comment.