Can anyone tell me what this code does?
Asobu04
Posts: 1
I was wondering if someone could tell me what this code does.
It starts off with
READ CompassLowVal, index
' Load current and previous table values.
READ CompassCal + index, table(current)
READ (CompassCal + (index - 1 & $F)), table(previous)
I'm assuming that it is loading the first value of CompassCal into table(curent) and the last value of CompassCal into table(previous). Is this right?
angleOffset = angleOffset * 16
angle = (angleOffset / span) + ((angleOffset // span) / (span / 2))
angle = ((index - 1 & $F) * 16) + angle
angle = angle & $ff
When I look at the statements (index-1 & $F) or (angle & $ff) it would seem that you would just get back your index-1 or angle respectively. Thanks!
It starts off with
READ CompassLowVal, index
' Load current and previous table values.
READ CompassCal + index, table(current)
READ (CompassCal + (index - 1 & $F)), table(previous)
I'm assuming that it is loading the first value of CompassCal into table(curent) and the last value of CompassCal into table(previous). Is this right?
angleOffset = angleOffset * 16
angle = (angleOffset / span) + ((angleOffset // span) / (span / 2))
angle = ((index - 1 & $F) * 16) + angle
angle = angle & $ff
When I look at the statements (index-1 & $F) or (angle & $ff) it would seem that you would just get back your index-1 or angle respectively. Thanks!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen