Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
d6e7fa3949
|
@ -30,9 +30,9 @@ func getSensorName(sensorsMap *map[string]string, sensorAddress uint64) string {
|
|||||||
return "Sensor" + key
|
return "Sensor" + key
|
||||||
}
|
}
|
||||||
|
|
||||||
func Parse(fPort int, _ []byte, frmPayload string, variables *map[string]database.VariableType, attributes *map[string]interface{}, _ *database.Device) error {
|
func Parse(fPort int, _ []byte, frmPayload string, variables *map[string]database.VariableType, attributes *map[string]interface{}, device *database.Device) error {
|
||||||
sensorsMap := make(map[string]string)
|
sensorsMap := make(map[string]string)
|
||||||
sensorsJSON, ok := (*attributes)["Sensors"].(string)
|
sensorsJSON, ok := (*device).Attributes["Sensors"].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("Unable to load sensor map from attributes")
|
return fmt.Errorf("Unable to load sensor map from attributes")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user