Skip to content

Commit

Permalink
Merge pull request #31 from rzetterberg/issue-27-issupported-function…
Browse files Browse the repository at this point in the history
…-incorrect-pids-outside-part1

Fixes issue #27
  • Loading branch information
rzetterberg committed Mar 8, 2020
2 parents c7e4c91 + b7a52d6 commit 9c7884b
Show file tree
Hide file tree
Showing 10 changed files with 573 additions and 208 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: go
go:
- 1.9
script:
- go tool vet --all .
- go fmt
- go vet
- go build -v ./...
- go test ./...
- go test -bench . ./...
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Changelog

## [0.7.0] - 2020-02-23

### Changed
- Commands `Part1Supported`, `Part2Supported`, `Part3Supported` are now deprecated by the generic command `PartSupported`

### Fixed
- Issue #27 - ISSupported function in device.go incorrect for PID's outside part 1

## [0.6.0] - 2019-03-20

### Fixed
- issue #18 - commands expect one byte as response - mocked device returned three bytes
- device identyfication issue - some device identified itself in second line of response
### Fixed
- Issue #18 - commands expect one byte as response - mocked device returned three bytes
- Device identyfication issue - some device identified itself in second line of response

### Added
- `NewDistSinceDTCClear` command (0x31) - distance since last DTC clear
- mocked responses for Fuel (0x2F), Speed (0x0D)
- Mocked responses for Fuel (0x2F), Speed (0x0D)

## [0.5.1] - 2018-08-15

Expand Down
4 changes: 2 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#+end_src

#+RESULTS: version_output
- Version :: 0.6.0
- Version :: 0.7.0

Go library for communicating with cars [[https://en.wikipedia.org/wiki/On-board_diagnostics][OBD-II]] system using [[https://www.elmelectronics.com/ic/elm327/][ELM327]] based
USB-devices.
Expand Down Expand Up @@ -378,4 +378,4 @@ The library has been used successfully on the following cars:
|---------------------------+-----------------+--------------|
| Lexus IS200 Manual 2004 | 0.3.0 | @rzetterberg |
| Ford Ka 2011 | 0.5.0 | @Enrico204 |
| Ford Transit Automat 2019 | 0.6.0 | @mikspec |
| Ford Transit Automat 2019 | 0.6.0 | @mikspec |
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.7.0
26 changes: 17 additions & 9 deletions automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,19 @@ def check(args):
logger.info('Checking quality of project')

command(['go', 'fmt'])
command(['go', 'tool', 'vet', '--all', '.'])
command(['go', 'vet'])
command(['go', 'build', '-v', './...'])
command(['golint'])

def test(args):
logger.info('Running benchmarks, unit tests and examples')
command(['go', 'test', '-bench', '.', './...'])

cmd = ['go', 'test']

if args.bench:
cmd = cmd + ['-bench', '.', './...']

command(cmd)

example_files = glob.glob('./examples/**/*.go', recursive=True)

Expand All @@ -117,17 +123,19 @@ def test(args):
help='Controls the log level, "info" is default'
)

check_parser = subparsers.add_parser(
'check',
)

check_parser = subparsers.add_parser('check')
check_parser.set_defaults(func=check)

test_parser = subparsers.add_parser(
'test',
test_parser = subparsers.add_parser('test')

test_parser.add_argument(
'--bench',
dest='bench',
action='store_true',
help='Controls whether to run benchmark or not'
)

test_parser.set_defaults(func=test)
test_parser.set_defaults(bench=False, func=test)

args = parser.parse_args()

Expand Down
Loading

0 comments on commit 9c7884b

Please sign in to comment.