diff --git a/DSView/pv/data/logicsnapshot.cpp b/DSView/pv/data/logicsnapshot.cpp index 6c54dbb6..d0f9f513 100755 --- a/DSView/pv/data/logicsnapshot.cpp +++ b/DSView/pv/data/logicsnapshot.cpp @@ -107,8 +107,6 @@ void LogicSnapshot::capture_ended() // qDebug()<<"total:"<<_total_sample_count<<","<<_times; - //assert(_ch_fraction == 0); - //assert(_byte_fraction == 0); uint64_t block_index = _ring_sample_count / LeafBlockSamples; uint64_t block_offset = (_ring_sample_count % LeafBlockSamples) / Scale; if (block_offset != 0) { @@ -119,13 +117,18 @@ void LogicSnapshot::capture_ended() for(auto& iter:_ch_data) { if (iter[index0].lbp[index1] == NULL){ - qDebug()<<"LogicSnapshot::capture_ended(), pointer is null"; - //assert(false); - continue; + iter[index0].lbp[index1] = malloc(LeafBlockSpace); + if (iter[index0].lbp[index1] == NULL) + { + _memory_failed = true; + return; + } + memset(iter[index0].lbp[index1], 0, LeafBlockSpace); } const uint64_t *end_ptr = (uint64_t *)iter[index0].lbp[index1] + (LeafBlockSamples / Scale); uint64_t *ptr = (uint64_t *)iter[index0].lbp[index1] + block_offset; + while (ptr < end_ptr) *ptr++ = 0; diff --git a/libsigrok4DSL/hardware/DSL/Makefile.am b/libsigrok4DSL/hardware/DSL/Makefile.am deleted file mode 100755 index 6ad8ba7a..00000000 --- a/libsigrok4DSL/hardware/DSL/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -## -## This file is part of the libsigrok project. -## -## Copyright (C) 2011 Uwe Hermann -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . -## - - -# Local lib, this is NOT meant to be installed! -noinst_LTLIBRARIES = libsigrok4DSL_hw_dsl.la - -libsigrok4DSL_hw_dsl_la_SOURCES = \ - command.c \ - dsl.c \ - dslogic.c \ - dscope.c - -libsigrok4DSL_hw_dsl_la_CFLAGS = \ - -I$(top_srcdir) - - diff --git a/libsigrok4DSL/hardware/Makefile.am b/libsigrok4DSL/hardware/Makefile.am deleted file mode 100755 index 1c699ab7..00000000 --- a/libsigrok4DSL/hardware/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -## -## This file is part of the libsigrok project. -## -## Copyright (C) 2011 Uwe Hermann -## Copyright (C) 2012 Alexandru Gagniuc -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . -## - -SUBDIRS = \ - demo \ - common \ - DSL - -noinst_LTLIBRARIES = libsigrok4DSLhardware.la - -libsigrok4DSLhardware_la_SOURCES = - -libsigrok4DSLhardware_la_LIBADD = - -if HW_DEMO -libsigrok4DSLhardware_la_LIBADD += demo/libsigrok4DSL_hw_demo.la -endif - -libsigrok4DSLhardware_la_LIBADD += common/libsigrok4DSL_hw_common.la -libsigrok4DSLhardware_la_LIBADD += DSL/libsigrok4DSL_hw_dsl.la diff --git a/libsigrok4DSL/hardware/common/Makefile.am b/libsigrok4DSL/hardware/common/Makefile.am deleted file mode 100755 index 71e1a03e..00000000 --- a/libsigrok4DSL/hardware/common/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -## -## This file is part of the libsigrok project. -## -## Copyright (C) 2011 Uwe Hermann -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . -## - - - -# Local lib, this is NOT meant to be installed! -noinst_LTLIBRARIES = libsigrok4DSL_hw_common.la - -libsigrok4DSL_hw_common_la_SOURCES = \ - ezusb.c \ - usb.c - -libsigrok4DSL_hw_common_la_CFLAGS = \ - -I$(top_srcdir) - - - diff --git a/libsigrok4DSL/hardware/demo/Makefile.am b/libsigrok4DSL/hardware/demo/Makefile.am deleted file mode 100755 index 41f40eb5..00000000 --- a/libsigrok4DSL/hardware/demo/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## -## This file is part of the libsigrok project. -## -## Copyright (C) 2011 Uwe Hermann -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . -## - -if HW_DEMO - -# Local lib, this is NOT meant to be installed! -noinst_LTLIBRARIES = libsigrok4DSL_hw_demo.la - -libsigrok4DSL_hw_demo_la_SOURCES = \ - demo.c - -libsigrok4DSL_hw_demo_la_CFLAGS = \ - -I$(top_srcdir) - -endif - diff --git a/libsigrok4DSL/input/Makefile.am b/libsigrok4DSL/input/Makefile.am deleted file mode 100755 index 2b539298..00000000 --- a/libsigrok4DSL/input/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## -## This file is part of the libsigrok project. -## -## Copyright (C) 2011 Uwe Hermann -## Copyright (C) 2013 Bert Vermeulen -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . -## - -# Local lib, this is NOT meant to be installed! -noinst_LTLIBRARIES = libsigrok4DSLinput.la - -libsigrok4DSLinput_la_SOURCES = \ - in_binary.c \ - in_vcd.c \ - in_wav.c \ - input.c - -libsigrok4DSLinput_la_CFLAGS = \ - -I$(top_srcdir) - diff --git a/libsigrok4DSL/output/Makefile.am b/libsigrok4DSL/output/Makefile.am deleted file mode 100755 index a7148af5..00000000 --- a/libsigrok4DSL/output/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -## -## This file is part of the libsigrok project. -## -## Copyright (C) 2011 Uwe Hermann -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . -## - -# Local lib, this is NOT meant to be installed! -noinst_LTLIBRARIES = libsigrok4DSLoutput.la - -libsigrok4DSLoutput_la_SOURCES = \ - output.c \ - csv.c \ - vcd.c \ - gnuplot.c \ - srzip.c - -libsigrok4DSLoutput_la_CFLAGS = \ - -I$(top_srcdir) - -#libsigrok4DSLogicoutput_la_LIBADD = \ -# text/libsigrok4DSLogicoutputtext.la - diff --git a/libsigrokdecode4DSL/version.h.in b/libsigrokdecode4DSL/version.h.in deleted file mode 100755 index 3053cefc..00000000 --- a/libsigrokdecode4DSL/version.h.in +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file is part of the libsigrokdecode project. - * - * Copyright (C) 2010 Uwe Hermann - * Copyright (C) 2012 Bert Vermeulen - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef LIBSIGROKDECODE_VERSION_H -#define LIBSIGROKDECODE_VERSION_H - -/** - * @file - * - * Version number definitions and macros. - */ - -/** - * @ingroup grp_versions - * - * @{ - */ - -/* - * Package version macros (can be used for conditional compilation). - */ - -/** The libsigrokdecode package 'major' version number. */ -#undef SRD_PACKAGE_VERSION_MAJOR - -/** The libsigrokdecode package 'minor' version number. */ -#undef SRD_PACKAGE_VERSION_MINOR - -/** The libsigrokdecode package 'micro' version number. */ -#undef SRD_PACKAGE_VERSION_MICRO - -/** The libsigrokdecode package version ("major.minor.micro") as string. */ -#undef SRD_PACKAGE_VERSION_STRING - -/* - * Library/libtool version macros (can be used for conditional compilation). - */ - -/** The libsigrokdecode libtool 'current' version number. */ -#undef SRD_LIB_VERSION_CURRENT - -/** The libsigrokdecode libtool 'revision' version number. */ -#undef SRD_LIB_VERSION_REVISION - -/** The libsigrokdecode libtool 'age' version number. */ -#undef SRD_LIB_VERSION_AGE - -/** The libsigrokdecode libtool version ("current:revision:age") as string. */ -#undef SRD_LIB_VERSION_STRING - -/** @} */ - -#endif