Skip to content

Commit

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

if module.Name == "raspberrypi-0" {
var obj Dht11
jsonString := string(fmt.Sprintf("`%s`", res))
err = json.Unmarshal([]byte(jsonString), &obj)
err = json.Unmarshal([]byte(res), &obj)
if err != nil {
log.Fatalf("error: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/raspberrypi3b/devices/dht11/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
d['t'] = temperature
d['h'] = humidity

print(print(json.dumps(d)))
print(json.dumps(d))

except:
print("read() error")
2 changes: 1 addition & 1 deletion modules/raspberrypi5/devices/dht11/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
d['t'] = dhtDevice.temperature
d['h'] = dhtDevice.humidity

print(print(json.dumps(d)))
print(json.dumps(d))

except Exception as error:
# dhtDevice.exit()
Expand Down

0 comments on commit ba18e90

Please sign in to comment.