Skip to content

Commit

Permalink
Removing the raspi_adafruit program as it has been split into three s…
Browse files Browse the repository at this point in the history
…eparate programs, removing my Makefile for the raspi adafruit programs, and fixing up a few comments.
  • Loading branch information
Josh Finken committed Sep 2, 2016
1 parent 8a4e5a6 commit 409cdfb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 112 deletions.
23 changes: 0 additions & 23 deletions examples/Makefile

This file was deleted.

82 changes: 0 additions & 82 deletions examples/raspi_adafruit.go

This file was deleted.

4 changes: 2 additions & 2 deletions examples/raspi_adafruit_stepper.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ func adafruitStepperMotorRunner(a *i2c.AdafruitMotorHatDriver, motor int) (err e
log.Printf("Stepper Motor Run Loop...\n")
// set the speed state:
speed := 30 // rpm
style := i2c.AdafruitMicrostep
steps := 50
style := i2c.AdafruitDouble
steps := 20

a.SetStepperMotorSpeed(motor, speed)

Expand Down
9 changes: 4 additions & 5 deletions platforms/i2c/adafruit_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ func TestAdafruitMotorHatDriverRunDCMotor(t *testing.T) {
ada, _ := initTestAdafruitMotorHatDriverWithStubbedAdaptor()

dcMotor := 1
// NOT using this prevents importing the i2c package
//dir := i2c.AdafruitForward
// NOTE: not using the direction constant to prevent importing
// the i2c package
err := ada.RunDCMotor(dcMotor, 1)
gobottest.Assert(t, err, nil)
}
Expand All @@ -107,9 +107,8 @@ func TestAdafruitMotorHatDriverSetStepperMotorSpeed(t *testing.T) {
func TestAdafruitMotorHatDriverStepperStep(t *testing.T) {
ada, _ := initTestAdafruitMotorHatDriverWithStubbedAdaptor()

// NOT using these prevents importing the i2c package
//dir := i2c.AdafruitForward
//style := i2c.AdafruitMicrostep
// NOTE: not using the direction and style constants to prevent importing
// the i2c package
stepperMotor := 0
steps := 50
err := ada.Step(stepperMotor, steps, 1, 3)
Expand Down

0 comments on commit 409cdfb

Please sign in to comment.