mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
fix: ir_sirc decoder script build error
This commit is contained in:
parent
f8191599f5
commit
7e9b044fa4
@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
QApplication::setOrganizationName("DreamSourceLab");
|
||||
QApplication::setOrganizationDomain("www.DreamSourceLab.com");
|
||||
|
||||
printf("\n-----------------version: %s-----------------\n\n", DS_VERSION_STRING);
|
||||
qDebug()<<"\n----------------- version:"<<DS_VERSION_STRING<<"-----------------\n\n";
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
// Use low version qt plugins, for able to debug
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
}
|
||||
|
||||
void begin_decode_work();
|
||||
void do_decode_work();
|
||||
|
||||
void stop_decode_work();
|
||||
int list_rows_size();
|
||||
bool options_changed();
|
||||
@ -153,7 +153,7 @@ private:
|
||||
void decode_data(const uint64_t decode_start, const uint64_t decode_end, srd_session *const session);
|
||||
void decode_proc();
|
||||
static void annotation_callback(srd_proto_data *pdata, void *decoder);
|
||||
|
||||
void do_decode_work();
|
||||
|
||||
signals:
|
||||
void new_decode_data();
|
||||
|
14
libsigrokdecode4DSL/decoders/common/srdhelper/mod.py
Normal file → Executable file
14
libsigrokdecode4DSL/decoders/common/srdhelper/mod.py
Normal file → Executable file
@ -31,6 +31,20 @@ def bin2int(s: str):
|
||||
def bitpack(bits):
|
||||
return sum([b << i for i, b in enumerate(bits)])
|
||||
|
||||
def bitpack_lsb(bits, idx=None):
|
||||
'''Conversion from LSB first bit sequence to integer.'''
|
||||
if idx is not None:
|
||||
bits = [b[idx] for b in bits]
|
||||
return bitpack(bits)
|
||||
|
||||
def bitpack_msb(bits, idx=None):
|
||||
'''Conversion from MSB first bit sequence to integer.'''
|
||||
bits = bits[:]
|
||||
if idx is not None:
|
||||
bits = [b[idx] for b in bits]
|
||||
bits.reverse()
|
||||
return bitpack(bits)
|
||||
|
||||
def bitunpack(num, minbits=0):
|
||||
res = []
|
||||
while num or minbits > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user