Commit Graph

94 Commits

Author SHA1 Message Date
Soeren Apel 22dc404045 Application: Do not show unsupported device drivers in version info 2021-12-21 22:09:51 +01:00
Kyle Johnson b987d46cc2 Ensure QT plugin imports are only done when compiling statically 2021-06-22 18:48:04 +02:00
Mickael Bosch f1e9295aa5 handle SIGUSR1 signal to run/stop the capture, UNIX only 2020-10-25 21:47:05 +01:00
Soeren Apel cf1541a18f Fix #1596 by making memory management more robust
1) Fixed use of raw pointers to shared_ptr-managed instances
2) Fixed bug due to newly-introduced shared_from_this
3) More nullptr checks
4) Add muxer thread interrupting
2020-09-03 21:09:35 +02:00
Soeren Apel 720f476238 Use shared_ptr for async samples_added() notification 2020-05-11 21:24:22 +02:00
Soeren Apel 1f3033cb3e Rework signals for modularity 2020-05-11 21:24:22 +02:00
Soeren Apel 0466001be5 Implement translations 2020-01-13 22:51:02 +01:00
Soeren Apel 96dbf014da Style fixes 2019-04-22 15:39:13 +02:00
Devan Lai 611c86259f Add -s / --settings parameter to load a session setup file 2019-04-22 14:19:47 +02:00
Uwe Hermann 024db17bd0 flow: Call Srf::init() early in main(). 2019-01-10 02:40:14 +01:00
Uwe Hermann 696c7eac4d Rename ENABLE_GSTREAMERMM to ENABLE_FLOW. 2019-01-10 02:26:18 +01:00
Uwe Hermann 045d81160a Add libsigrokflow build system integration. 2018-12-29 18:21:19 +01:00
Uwe Hermann 5252f4388c Add ENABLE_GSTREAMERMM, make gstreamermm support optional. 2018-12-29 17:11:47 +01:00
Uwe Hermann c9f573751b Add new dependency: libgstreamermm >= 1.8.0.
Also, initialize gstreamermm in main().
2018-12-29 17:11:47 +01:00
Soeren Apel 21f5864602 Move meta type declaration out of MainWindow 2018-10-27 21:17:52 +02:00
Soeren Apel 374c697f74 Settings: Allow user to choose the Qt UI style 2018-10-27 21:17:52 +02:00
Soeren Apel f4ab4b5c65 Fix clazy warnings regarding range-for references
The warnings that are fixed are of this type:
warning: Missing reference in range-for with non trivial type (std::__cxx11::string) [-Wclazy-range-loop]
2018-10-21 21:22:01 +02:00
Soeren Apel 37b0bd3594 Add themes and implement theme support 2018-10-16 23:37:19 +02:00
Soeren Apel 0e96068df2 Rename --no-scan to --dont-scan 2018-10-03 23:21:12 +02:00
Soeren Apel 4971985821 Fix #1213 by improving the version information handling 2018-09-28 23:59:18 +02:00
Soeren Apel 1f2082e204 Include suggested changes by clang-tidy 2018-09-13 20:10:01 +02:00
Gerhard Sittig 4b9234088f Logging: obsolete -s, log to internal buffer as well as stdout
Query the sr and srd libraries' current log routines before registering
PV's own log callback which queues messages in an internal buffer. This
allows duplication of messages to the internal buffer _and_ stdout, and
thus obsoletes the -s option.
2018-08-30 19:17:20 +02:00
Gerhard Sittig 6a96e1b2b5 main.cpp: straighten the getopt/optind adjustment before openfiles
The pulseview(1) application accepts input file specs either as argument
to the -i option, or as positional arguments after the command line options.

Simplify the logic which collects remaining non-option command line words
after getopt(3) is done. As a byproduct the application code no longer
manipulates a variable that is owned by an external library.
2018-06-19 18:49:50 +02:00
Soeren Apel caa2b3e9bd Fix #1040 by allowing multiple files to be loaded from command line 2018-06-06 01:10:32 +02:00
Soeren Apel c5d6200c96 Main: Create human-readable stack trace and notify user 2018-03-30 21:05:16 +02:00
Soeren Apel d0f22e70fa Main: Add missing --no-scan long option for -D 2018-03-30 20:20:11 +02:00
Soeren Apel c062efdcc6 Main: Add -s option to allow logging to console as before 2018-03-30 20:20:11 +02:00
Soeren Apel bcb4c327ee Add logging mechanism 2018-03-30 18:55:45 +02:00
Soeren Apel c1a688dec0 Add boost::stacktrace support 2018-03-29 23:29:57 +02:00
Dan Horák 30677c1392 fix catching polymorphic types by value
Compiling with GCC 8 produces a new warning about catching polymorphic
types by value. Proper way is to use references instead.

/home/sharkcz/projects/pulseview/main.cpp: In function ‘int main(int, char**)’:
/home/sharkcz/projects/pulseview/main.cpp:229:22: error: catching polymorphic type ‘class std::exception’ by value [-Werror=catch-value=]
   } catch (exception e) {
                      ^
cc1plus: all warnings being treated as errors
2018-03-23 22:18:40 +01:00
Gerhard Sittig 1d6e35dcef main: introduce -D cmdline option, don't auto-scan for devices
Add a -D command line option which skips auto-detection of devices upon
startup. This can speedup program startup for setups with known devices,
and allows to skip the scan for troubled drivers which might break the
startup phase.

This -D option can be combined with -d specs, either presence or absence
of -d is acceptable when -D is specified. Users still can interactively
scan for and use devices after program startup.

This resolves bug #1116.
2018-01-26 17:35:31 +01:00
Gerhard Sittig ed6f8680ba main.cpp: check log level range before using its value
(Silently) ignore invalid -l loglevel specs. This avoids a crash
reported in bug #1071.
2018-01-10 19:19:35 +01:00
Soeren Apel 419ec4e11e Make sigrok::Context semi-global and use libsigrok A2L methods 2017-07-06 00:37:08 +02:00
Gerhard Sittig 58d8e4c6c5 device manager: Add support for -d cmdline option (driver scan options)
The previous implementation had support to auto-detect devices and to
connect to and pick devices by filling in dialogs, optionally providing
scan options that did not apply to auto-detection. This commit extends
the existing support by introducing a -d command line option similar to
sigrok-cli.

In the absence of the -d command line option, behaviour is identical to
the previous implementation. When -d is provided, the specified driver
is excluded from the auto-detection phase, and another scan is executed
afterwards where the user specified scan options take effect. This shall
result in least interaction and highest reliability of device detection,
while flexibility is increased.

Here are examples of what the -d command line option can do:

  $ pulseview -d ols:conn=/dev/ttyACM0
  $ pulseview -d fx2lafw
  $ pulseview -d demo:logic_channels=32:analog_channels=8

This fixes bug #953.
2017-06-27 13:20:06 +02:00
Soeren Apel 3ed18835d8 Main(Window): Let the UI and sessions be restored after w.show() 2017-06-09 21:57:21 +02:00
Soeren Apel 41e2ade4fc Update cli usage hint and remove unnecessary description text
I don't know any cli tool that shows a description text
on the same line as the usage and sigrok-cli doesn't do it
either, so it shouldn't be there.
As I don't see any other place where it would make sense,
I remove it completely.
2017-06-06 16:17:26 +02:00
Soeren Apel ed77633334 Replace non-ASCII characters 2017-06-06 16:17:26 +02:00
Soeren Apel 156f06e95f Fix #862 by implementing -c / --clean 2017-06-06 16:17:26 +02:00
Uwe Hermann 0bd39c0c6f Log settings location when using "-l 5".
This can have various types (e.g. a file or a registry entry) and it can
be in various locations on different OSes, so having this as part of the
log output is pretty useful.
2017-05-09 22:08:59 +02:00
Uwe Hermann c063290ac7 Random simplifications, cosmetics/whitespace/consistency fixes. 2017-03-23 19:42:18 +01:00
Uwe Hermann 15a69e5484 main.cpp: Minor consistency fixes found by clang-tidy. 2017-03-18 20:01:54 +01:00
Uwe Hermann 6f925ba9d6 Don't use std:: in the code directly (where possible).
Use "using std::foo" to make the actual code itself a lot more readable.

There are some exceptions where we usually cannot do this, e.g. std::thread
often conflicts with "thread" from Qt or Boost.
2017-03-18 20:00:51 +01:00
Uwe Hermann 09f55d9665 Build fixes for Qt5 Windows/mingw/MXE support.
We currently need to (ab)use pkg-config to get all the required
Qt5 static linking dependencies right, since this doesn't yet
work properly in MXE's cmake.

We use ${PKGDEPS_STATIC_LDFLAGS} instead of ${PKGDEPS_STATIC_LIBRARIES}
to avoid some linker issues related to libbz2.

We need to add Qt5::QSvgPlugin, Qt5::QWindowsIntegrationPlugin,
Qt5PlatformSupport and all the Qt5 libs and their dependencies to
the link libraries list (for both PulseView and the unit tests).

In one of the source code files we need to explicitly list all
static Qt plugins via Q_IMPORT_PLUGIN to make static builds work,
which is currently QWindowsIntegrationPlugin and QSvgPlugin.

We're only focusing on having a working Qt5 build for Windows,
as we no longer need to or want to support Qt4 there.

Details:
https://github.com/mxe/mxe/issues/1642

Thanks to Tony Theodore for the help!

This should also fix bug #871, since we're now building with Qt >= 5.6
which has high-DPI support in general.

Tested via manual specification (might need further changes, though):

  set QT_SCALE_FACTOR=2
  pulseview.exe
2017-01-29 19:48:42 +01:00
Gerhard Sittig efdec55aec license: remove FSF postal address from boiler plate license text
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
2017-01-07 16:11:15 +01:00
Uwe Hermann f74015db20 Use nullptr in some more places.
This patch was generated using clang-tidy:

  clang-tidy -checks="-*,modernize-use-nullptr" -fix
2016-02-13 20:41:33 +01:00
Uwe Hermann 39ccf9c39e Fix a bunch of random typos. 2016-01-03 20:40:27 +01:00
Uwe Hermann 2ad82c2e40 Various minor whitespace and consistency fixes. 2015-12-26 15:10:01 +01:00
Daniel Elstner dddff2e7c6 android: Read firmware resources from assets
Set up a resource reader to load firmware resources as assets
bundled with the APK.
2015-09-28 17:29:48 +02:00
Uwe Hermann 3e5bc2687f Restore the default of "pulseview foo.sr" opening the file.
This used to work in e.g. the 0.2.0 release and is much more convenient
than having to supply "-i" for every file. It also allows for (easier, at
least) association of the .sr extension with PulseView on most OSes.
2015-08-21 17:14:12 +02:00
Uwe Hermann f329055303 Minor whitespace fixes. 2015-07-25 18:05:11 +02:00