Modularise and improve step cycle

This commit is contained in:
2021-06-06 18:23:52 +02:00
parent eb7c4a8067
commit edd947a857
7 changed files with 98 additions and 29 deletions
+16 -4
View File
@@ -6,19 +6,31 @@ import Geometry.Data
import Control.Lens
data Stance = Stance
{_carriage :: Carriage
,_posture :: Posture
{_carriage :: Carriage
,_posture :: Posture
,_strideLength :: Int
}
deriving (Eq,Show)
data Carriage
= Walking { _stepCycle :: Int, _stepToAdd :: Int }
= Walking
{ _strideAmount :: Int
, _currentFoot :: FootForward
}
| Standing
| Floating
| Flying
| Boosting Point2
deriving (Eq,Show)
data FootForward
= LeftForward
| RightForward
| WasLeftForward
| WasRightForward
deriving
(Eq,Ord,Show)
data Posture = Aiming | AtEase
deriving (Eq,Ord,Show)
deriving
(Eq,Ord,Show)
makeLenses ''Stance
makeLenses ''Carriage