Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

surfaceToTransducer unicode string? #39

Closed
ph1l opened this issue Mar 20, 2017 · 4 comments
Closed

surfaceToTransducer unicode string? #39

ph1l opened this issue Mar 20, 2017 · 4 comments

Comments

@ph1l
Copy link
Contributor

ph1l commented Mar 20, 2017

According to the spec (https://github.com/SignalK/specification/blob/master/schemas/groups/environment.json#L158) this should be a numeric value not a string

elektron@x61s:~/code/python-signalk-client$ curl -s http://raspberrypi:8080/signalk/v1/api/vessels/urn:mrn:signalk:uuid:48fa5c95-7316-4ad9-bdf1-f99c9124ac46/environment/depth/ | jq .
{
  "surfaceToTransducer": "0.13935455554065423",
  "meta": {
    "warnMethod": "visual",
    "displayUnit": "ft",
    "alarmMethod": "visual",
    "zones": [
      {
        "lower": 0,
        "upper": 0.4571999853696005,
        "state": "alarm",
        "message": "Danger"
      },
      {
        "lower": 0.4571999853696005,
        "upper": 0.5029199839065605,
        "state": "warn",
        "message": "Shallow Water"
      },
      {
        "lower": 0.5029199839065605,
        "upper": 3047.695102473757,
        "state": "normal",
        "message": ""
      }
    ]
  },
  "belowTransducer": {
    "values": {
      "/dev/ttyACM0": {
        "NMEA0183": {
          "DBT": {
            "value": 3,
            "$source": "/dev/ttyACM0.NMEA0183.DBT",
            "timestamp": "2017-03-20T08:57:29.848Z"
          },
          "DPT": {
            "value": 3,
            "$source": "/dev/ttyACM0.NMEA0183.DPT",
            "timestamp": "2017-03-20T08:57:29.770Z"
          }
        }
      }
    },
    "value": 3,
    "$source": "/dev/ttyACM0.NMEA0183.DBT",
    "timestamp": "2017-03-20T08:57:29.848Z"
  }
}
ph1l added a commit to ph1l/python-signalk-client that referenced this issue Mar 20, 2017
@rob42
Copy link
Contributor

rob42 commented Mar 20, 2017

Is this a bug in the signalk-java-server or the python server?

@ph1l
Copy link
Contributor Author

ph1l commented Mar 20, 2017

According to the spec, environment.depth.surfaceToTransducer should be a numeric value not a string.

I believe this is a bug in signalk-java-server

@rob42
Copy link
Contributor

rob42 commented Mar 20, 2017

Yes it should be a numeric. I saw the ref to the python server above and wasnt sure it was a java-server bug.

@rob42
Copy link
Contributor

rob42 commented Apr 3, 2017

Fixed now

  "surfaceToTransducer": {
      "values": {
        "urn:mrn:signalk:uuid:705f5f1a-efaf-44aa-9cb8-a0fd6305567c": {
          "value": 0.4572,
          "$source": "self",
          "timestamp": "2017-03-20T04:01:23.936Z"
        }
      },
      "value": 0.4572,
      "$source": "self",
      "timestamp": "2017-03-20T04:01:23.936Z"
    },

@rob42 rob42 closed this as completed Apr 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants