Skip to content

Commit

Permalink
Bumping version to 1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Mar 16, 2019
1 parent 0bba9eb commit b2803b3
Show file tree
Hide file tree
Showing 9 changed files with 301 additions and 323 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.2.0-runtime
FROM microsoft/dotnet:2.2.1-runtime
COPY /deploy .

# Install Python.
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes

## 1.1.6 - 2019-03-16
## 1.1.7 - 2019-03-16
* Upgrade Raspbian

## 1.1.0 - 2019-01-20
Expand Down
5 changes: 3 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ group Build
storage: none
source https://api.nuget.org/v3/index.json

nuget FSharp.Core 4.3.4 // https://github.com/fsharp/FAKE/issues/2001
nuget FSharp.Core
nuget Fake.Core.Target
nuget Fake.DotNet.Cli
nuget Fake.Tools.Git
Expand All @@ -50,4 +50,5 @@ group Pi
nuget Thoth.Json
nuget log4net
nuget Elmish
nuget Unosquare.Raspberry.IO
nuget Unosquare.Raspberry.IO
nuget Unosquare.WiringPi
571 changes: 268 additions & 303 deletions paket.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Client/ReleaseNotes.fs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module internal ReleaseNotes

let Version = "1.1.6"
let Version = "1.1.7"

let IsPrerelease = false

let Notes = """
# Release Notes
## 1.1.6 - 2019-03-16
## 1.1.7 - 2019-03-16
* Upgrade Raspbian
## 1.1.0 - 2019-01-20
Expand Down
3 changes: 2 additions & 1 deletion src/Client/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ group Client
Fulma
Fable.FontAwesome.Free
Thoth.Json.Net
Thoth.Json
Thoth.Json

20 changes: 13 additions & 7 deletions src/PiServer/GeneralIO.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ open System.Threading.Tasks
open FSharp.Control.Tasks.ContextInsensitive

open Unosquare.RaspberryIO
open Unosquare.WiringPi
open Unosquare.RaspberryIO.Abstractions

type LED(pin:Gpio.GpioPin) =

let init() =
Pi.Init<BootstrapWiringPi>()

type LED(pin:IGpioPin) =
let mutable active = false
do
pin.PinMode <- Gpio.GpioPinDriveMode.Output
pin.PinMode <- GpioPinDriveMode.Output
pin.Write false

with
Expand All @@ -31,16 +37,16 @@ type LED(pin:Gpio.GpioPin) =
do! Task.Delay(300)
}

type Button(pin:Gpio.GpioPin,onPress) =
type Button(pin:IGpioPin,onPress) =
let mutable lastChangedState = DateTime.MinValue
let bounceTimeSpan = TimeSpan.FromMilliseconds 30.
let mutable lastState = false
do
pin.PinMode <- Gpio.GpioPinDriveMode.Input
pin.InputPullMode <- Gpio.GpioPinResistorPullMode.PullUp
pin.PinMode <- GpioPinDriveMode.Input
pin.InputPullMode <- GpioPinResistorPullMode.PullUp
lastState <- pin.Read()
pin.RegisterInterruptCallback(
Gpio.EdgeDetection.RisingAndFallingEdges,
EdgeDetection.FallingAndRisingEdge,
fun () ->
let state = pin.Read()
let time = DateTime.UtcNow
Expand All @@ -60,7 +66,7 @@ type Button(pin:Gpio.GpioPin,onPress) =
interface IDisposable with
member __.Dispose() = d.Dispose()

let waitForButtonPress (pin:Gpio.GpioPin) = task {
let waitForButtonPress (pin:IGpioPin) = task {
let pressed = ref false
use _button = new Button(pin,(fun _ -> pressed := true))
while not !pressed do
Expand Down
13 changes: 8 additions & 5 deletions src/PiServer/PiServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ open GeneralIO
open Elmish
open Elmish.Audio
open System.Net.NetworkInformation
open Unosquare.RaspberryIO.Abstractions


GeneralIO.init()

let firmwareTarget = System.IO.Path.GetFullPath "/home/pi/firmware"

Expand Down Expand Up @@ -72,11 +76,10 @@ type Msg =
let rfidLoop (dispatch,nodeServices:INodeServices) = task {
log.InfoFormat("Connecting all buttons")

use _nextButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.Pin07, fun () -> dispatch NextMediaFile)
use _previousButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.Pin01, fun () -> dispatch PreviousMediaFile)
use _volumeDownButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.Pin25, fun () -> dispatch VolumeDown)
use _volumeUpButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.Pin26, fun () -> dispatch VolumeUp)

use _nextButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.[BcmPin.Gpio04], fun () -> dispatch NextMediaFile)
use _previousButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.[BcmPin.Gpio18], fun () -> dispatch PreviousMediaFile)
use _volumeDownButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.[BcmPin.Gpio16], fun () -> dispatch VolumeDown)
use _volumeUpButton = new Button(Unosquare.RaspberryIO.Pi.Gpio.[BcmPin.Gpio20], fun () -> dispatch VolumeUp)

log.InfoFormat("Waiting for RFID cards or NFC tags...")
while true do
Expand Down
4 changes: 3 additions & 1 deletion src/PiServer/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ group Pi
Thoth.Json
log4net
Unosquare.Raspberry.IO
Elmish
Elmish
Unosquare.WiringPi

0 comments on commit b2803b3

Please sign in to comment.