Skip to content

Commit

Permalink
remove RNHP adc conversion for now
Browse files Browse the repository at this point in the history
  • Loading branch information
natronics committed May 12, 2014
1 parent dc83c97 commit c0d2960
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions psas_packet/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,21 +288,24 @@ def typedef(self):
]
})

# ADC scale for power measuremnets
#_rnhpscale = (3.3/2.0**12) * (63000.0/69800.0)
_rnhpscale = 1.0

RNHP = Message({
'name': "RNHPower",
'fourcc': b'RNHP',
'size': "Fixed",
'endianness': '!',
'members': [
{'key': "Port1", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port2", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port3", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port4", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port5", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port6", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port7", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port8", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': (3.3/2.0**12) * (63000.0/69800.0)}},
{'key': "Port1", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port2", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port3", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port4", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port5", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port6", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port7", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
{'key': "Port8", 'stype': "H", 'units': {'mks': 'amp', 'scaleby': _rnhpscale}},
]
})

Expand Down

0 comments on commit c0d2960

Please sign in to comment.