mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-23 00:05:13 +03:00
Use Python 2/3 compatible scripts
Almost entirely fixing print statements, but also a couple importing
changes, wrapped in try/excepts, and one case where dict.keys() not
being a list would be a problem.
Also reverts e41139a397
The real fix for #1907
This commit is contained in:
parent
b3d52e3525
commit
5efa5d47d3
14 changed files with 103 additions and 72 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
SIGN_BIT = (0x80) # Sign bit for a A-law byte.
|
||||
QUANT_MASK = (0xf) # Quantization field mask.
|
||||
SEG_SHIFT = (4) # Left shift for segment number.
|
||||
|
@ -47,5 +49,5 @@ def tableToString(name, table):
|
|||
result += ' };'
|
||||
return result
|
||||
|
||||
print tableToString('alawTable', pcmTable(alaw2linear))
|
||||
print tableToString('ulawTable', pcmTable(ulaw2linear))
|
||||
print(tableToString('alawTable', pcmTable(alaw2linear)))
|
||||
print(tableToString('ulawTable', pcmTable(ulaw2linear)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue