gobot.io/x/gobot/v2@v2.1.0/platforms/parrot/minidrone/pitch_test.go (about)

     1  package minidrone
     2  
     3  import (
     4  	"testing"
     5  
     6  	"gobot.io/x/gobot/v2/gobottest"
     7  )
     8  
     9  func TestMinidroneValidatePitchWhenEqualOffset(t *testing.T) {
    10  	gobottest.Assert(t, ValidatePitch(32767.0, 32767.0), 100)
    11  }
    12  
    13  func TestMinidroneValidatePitchWhenTiny(t *testing.T) {
    14  	gobottest.Assert(t, ValidatePitch(1.1, 32767.0), 0)
    15  }
    16  
    17  func TestMinidroneValidatePitchWhenCentered(t *testing.T) {
    18  	gobottest.Assert(t, ValidatePitch(16383.5, 32767.0), 50)
    19  }