Skip to content

Commit

Permalink
fix5
Browse files Browse the repository at this point in the history
  • Loading branch information
torchiaf committed Feb 2, 2025
1 parent 82c501c commit 6e7b2df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"encoding/json"
"fmt"
"log"
"math"
"strconv"
Expand Down Expand Up @@ -46,7 +47,8 @@ func main() {

if module.Name == "raspberrypi-0" {
var obj Dht11
err = json.Unmarshal([]byte(res), &obj)
jsonString := string(fmt.Sprintf("`%s`", res))
err = json.Unmarshal([]byte(jsonString), &obj)
if err != nil {
log.Fatalf("error: %v", err)
}
Expand Down
1 change: 1 addition & 0 deletions modules/raspberrypi5/devices/dht11/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
dhtDevice = _device(_board)

try:

d = dict();

d['t'] = dhtDevice.temperature
Expand Down

0 comments on commit 6e7b2df

Please sign in to comment.