Skip to content

Commit

Permalink
Version 2, unit tests (#8)
Browse files Browse the repository at this point in the history
* Change thread implementation, improve plotter graph fitting

* Remove unnecessary header files

* Make requested changes

* Logging mode selection, and refactor lammdas

* Tweaks to plotter

* Unit tests

* Update README with screenshot and better description
  • Loading branch information
ambyjkl authored and Deep Dhillon committed Jun 20, 2018
1 parent 51e65e0 commit c01a26f
Show file tree
Hide file tree
Showing 19 changed files with 973 additions and 475 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ CMakeLists.txt.user*

# Dolphin
.directory

# Coverage
test
coverage
*.gcda
*.gcno
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

WSerial is a Serial Monitor and a Serial Plotter to visualize data from devices transmitting data using Serial. This is developed at [**Waterloop**](https://teamwaterloop.ca/) and is one of the best-in-class GUI design out there. You can either clone this project and follow the development instructions to build it locally or install our prebuilt binaries (they will be added soon).

![Screenshot](screenshot.png "Screenshot")

## Features

- Scales well on HDPI devices
- Built using Qt so, it compiles directly on your machine
- Uses GPU instead of CPU for plotting data on the plotter
- Uses GPU with OpenGL acceleration instead of CPU for plotting data on the plotter for smooth user experience
- Flexibility to make the range of X Axis values of the plotter longer and shorter
- Y Axis scales based on the highest and the lowest value encountered on the screen
- Y Axis scales based on the highest and the lowest value encountered on the screen, two options available for fine-tuning:
- "Best fit" takes the visible portion of the plot and fits it as snugly as it can on the Y Axis
- "Extremes only" (default) just increases the maximum/minimum limit of the Y Axis respectively when a maximum/minimum is reached
- Allows the opening of Serial window and the plotter at the same time
- Allows the user to pause the Serial ouput on the screen
- Allows the user to pause the Serial output on the screen
- Allows for changing ports and baudrate

## Development Instructions for Windows
Expand Down
20 changes: 20 additions & 0 deletions coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh
echo "Building test..."
qmake -makefile -o test/Makefile src/wserial.pro -config test DEFINES+="LOGGING_MODE=QDEBUG"
cd test
make -j4
if [[ "$?" != "0" ]] ; then
echo "Build failed!"
exit 1
fi
lcov -d . -z
echo "Running test..."
./test
if [[ "$?" != "0" ]] ; then
echo "One or more tests failed!"
exit 1
fi
lcov -d . -c -o lcov.info
lcov -r lcov.info '/usr/*' '*/moc_*' '*/ui_*' '*/qrc_*' '*.h' '*tests/*' -o lcov.info
lcov -l lcov.info
genhtml -o ../coverage -t "Test Coverage" --num-spaces 4 lcov.info
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/icons/zoom-fit-best.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c01a26f

Please sign in to comment.