Permalink
Browse files

Stylistic changes.

  • Loading branch information...
mitar committed Nov 10, 2010
1 parent 2366f67 commit e202d7ea63423ee68fe7b2c7f43f41cbf9f08842
Showing with 4 additions and 6 deletions.
  1. +1 −2 lib/Compass.hs
  2. +2 −2 lib/Types.hs
  3. +1 −2 lib/UltrasonicSensor.hs
View
@@ -11,7 +11,6 @@ module NXT.Compass (
) where
import Control.Monad
-import Data.Word
import NXT.NXT
import NXT.Data
@@ -39,7 +38,7 @@ csInit :: InputPort -> NXT ()
csInit input = do
setInputModeConfirm input Lowspeed9V RawMode
ready <- lowspeedGetStatus input
- when (ready > 0) $ do lowspeedRead input ; return () -- clears any possible pending data in the buffer
+ when (ready > 0) $ lowspeedRead input >> return () -- clears any possible pending data in the buffer
csSetMode input ResultInteger
csReadByte :: Integral a => InputPort -> Command -> NXT a
View
@@ -78,8 +78,8 @@ data SensorMode =
| FahrenheitMode
| AngleStepsMode -- reports scaled value as count of ticks on RCX-style rotation sensor
-- two modes unnecessary?
- -- | SlopeMask
- -- | ModeMask
+ -- SlopeMask
+ -- ModeMask
deriving (Eq, Show)
type RawADValue = Int
type NormalizedADValue = Int -- normalized A/D value, in [0, 1023] range
View
@@ -29,7 +29,6 @@ module NXT.NXTUltrasonicSensor (
import Control.Exception
import Control.Monad
import Control.Monad.Trans
-import Data.Word
import NXT.NXT
import NXT.Data
@@ -62,7 +61,7 @@ usInit :: InputPort -> NXT ()
usInit input = do
setInputModeConfirm input Lowspeed9V RawMode
ready <- lowspeedGetStatus input
- when (ready > 0) $ do lowspeedRead input ; return () -- clears any possible pending data in the buffer
+ when (ready > 0) $ lowspeedRead input >> return () -- clears any possible pending data in the buffer
usSetCommandState input WarmReset
usReadByte :: Integral a => InputPort -> Command -> NXT a

0 comments on commit e202d7e

Please sign in to comment.