{"action":"created","issue":{"url":"https://api.github.com/repos/UAVCAN/dsdl/issues/33","repository_url":"https://api.github.com/repos/UAVCAN/dsdl","labels_url":"https://api.github.com/repos/UAVCAN/dsdl/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/UAVCAN/dsdl/issues/33/comments","events_url":"https://api.github.com/repos/UAVCAN/dsdl/issues/33/events","html_url":"https://github.com/UAVCAN/dsdl/issues/33","id":249867371,"number":33,"title":"DSDL Suggestion: GenericBatteryInfo","user":{"login":"olliw42","id":6089567,"avatar_url":"https://avatars1.githubusercontent.com/u/6089567?v=4","gravatar_id":"","url":"https://api.github.com/users/olliw42","html_url":"https://github.com/olliw42","followers_url":"https://api.github.com/users/olliw42/followers","following_url":"https://api.github.com/users/olliw42/following{/other_user}","gists_url":"https://api.github.com/users/olliw42/gists{/gist_id}","starred_url":"https://api.github.com/users/olliw42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olliw42/subscriptions","organizations_url":"https://api.github.com/users/olliw42/orgs","repos_url":"https://api.github.com/users/olliw42/repos","events_url":"https://api.github.com/users/olliw42/events{/privacy}","received_events_url":"https://api.github.com/users/olliw42/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-13T11:15:27Z","updated_at":"2017-08-13T13:17:59Z","closed_at":null,"body":"I suggest adding this message to the standard\r\n\r\nuavcan.equipment.power.GenericBatteryInfo \r\nid = 1093\r\n```\r\n#\r\n# Generic battery info.\r\n#\r\n\r\nuint16 battery_id #can be freely assigned by the user, but must be unique within a system\r\n\r\nfloat16 voltage\r\nfloat16 current\r\nfloat16 charge_consumed_mAh\r\n\r\nuint8 STATUS_FLAG_ERROR_OVERVOLTAGE  = 1\r\nuint8 STATUS_FLAG_ERROR_UNDERVOLTAGE = 2\r\nuint8 STATUS_FLAG_ERROR_OVERCURRENT  = 4\r\nuint8 STATUS_FLAG_ERROR_UNDERCURRENT = 8\r\nuint8 status_flags\r\n```\r\n\r\nHere, battery_id should not match battery_id of the BatteryInfo message. That is, every battery should have it's own, unique battery_id, but every battery is free to decide which message, GenericBatteryInfo or BatteryInfo, it wants to emit (or both).\r\n\r\nReasons for that additional message: 13th post here https://github.com/ArduPilot/ardupilot/pull/6527\r\n\r\nIn principle, I would think that the existing BatteryInfo message could need a revision. First, I think it would be better named SmartBatteryInfo. Also, I think the suggested use of battery_id isn't suitable. It should be unique within each system, of course, but otherwise the user may assign it as she/he wants. That is, she/he may number ALL her/his batteries once and for all, more along the lines of a GUID. Anything else would not be very practical. E.g., if the primary battery would have to have battery_id = 0, as currently suggested, every change of a battery would need fumbling around with the id's. How nasty. In that light, a range of unit8 for battery_id might be quite narrow."},"comment":{"url":"https://api.github.com/repos/UAVCAN/dsdl/issues/comments/322041682","html_url":"https://github.com/UAVCAN/dsdl/issues/33#issuecomment-322041682","issue_url":"https://api.github.com/repos/UAVCAN/dsdl/issues/33","id":322041682,"user":{"login":"pavel-kirienko","id":3298404,"avatar_url":"https://avatars2.githubusercontent.com/u/3298404?v=4","gravatar_id":"","url":"https://api.github.com/users/pavel-kirienko","html_url":"https://github.com/pavel-kirienko","followers_url":"https://api.github.com/users/pavel-kirienko/followers","following_url":"https://api.github.com/users/pavel-kirienko/following{/other_user}","gists_url":"https://api.github.com/users/pavel-kirienko/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-kirienko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-kirienko/subscriptions","organizations_url":"https://api.github.com/users/pavel-kirienko/orgs","repos_url":"https://api.github.com/users/pavel-kirienko/repos","events_url":"https://api.github.com/users/pavel-kirienko/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-kirienko/received_events","type":"User","site_admin":false},"created_at":"2017-08-13T13:17:59Z","updated_at":"2017-08-13T13:17:59Z","body":"`battery_id` in the existing message is supposed to identify the battery *within the system*, it doesn't need to be globally unique. I'm going to add some more information about the usage of ID fields to the specification."}}
{"actor":{"display_login":"pavel-kirienko"}}