Simon Albinsson
561d4bd1c4
mock_smbus:canged smbus import to python3style
2018-04-22 19:54:17 +00:00
Simon Albinsson
c27a93c4ee
setup.py: Adds requirements
2018-04-22 19:53:34 +00:00
Simon Albinsson
604da15045
README: Todo: fix python3
2018-04-22 19:52:45 +00:00
Simon Albinsson
de5851ad89
Makefile: Now runs tests with python3
2018-04-22 19:52:18 +00:00
Simon Albinsson
74e5aceb05
setup.py: updaed author and syntaxfix
2018-04-22 19:40:55 +00:00
Simon Albinsson
2169816f40
Updates readme to reflect the library better
2018-04-22 19:40:11 +00:00
Simon Albinsson
f21f54f7cd
Adds set air quality, some work on base-line save
2018-04-16 12:51:28 +00:00
Simon Albinsson
d5ba6a9cab
New main fuction should actually be usefull.
2018-04-16 12:46:23 +00:00
Simon Albinsson
5a3bfcfd3d
removes unneccesary bind
...
There is no point in binding rw-function to the right bus-object if we
are already in an object that is bound to a bus.
2018-04-16 12:43:45 +00:00
Simon Albinsson
9292f4e17e
Adds timing to mock-bus
...
I dont know if it is a limitation of i2cwr or the sgp but it dosnt seem
to clock-strech but rahter just not present any data if the messure ment
is not done, so timing is important. The test should now fail if data is
read to fast
2018-04-16 12:39:39 +00:00
Simon Albinsson
ac4446cb36
Re-adds a sleep that got lost in refactorization
2018-04-13 09:26:11 +00:00
Simon Albinsson
3c9c402dad
Further fixing of op-codes
2018-04-13 08:52:48 +00:00
Simon Albinsson
874d95335e
Fixes invalid invalid op-codeds
2018-04-13 08:42:54 +00:00
Simon Albinsson
e82bdb3a5b
Fixes some comments and messages
2018-04-12 22:50:42 +00:00
Simon Albinsson
33a1a15b20
sgp30: refactor load-save-baseline
2018-04-12 22:46:16 +00:00
Simon Albinsson
d1bfc5ed3e
Test: Load/save baseline
2018-04-12 22:45:42 +00:00
Simon Albinsson
cc50d4a735
Fixes bug due to accidental line dupplication
2018-04-12 21:52:36 +00:00
Simon Albinsson
1a25064710
Test: i2c-read now protects agains double reads
2018-04-12 21:51:59 +00:00
Simon Albinsson
b42c4f33e1
adds crc-check to read_write method
2018-04-12 21:41:58 +00:00
Simon Albinsson
17e8468f58
test: naive test of crc
2018-04-12 21:40:17 +00:00
Simon Albinsson
d803d31af5
test:fixes bug in CRC-coruption routine
2018-04-12 21:38:29 +00:00
Simon Albinsson
5c6086d0e2
Test:adds support for breaking crc
2018-04-12 21:22:14 +00:00
Simon Albinsson
a38a71d186
adds requirements.txt
2018-04-12 21:11:46 +00:00
Simon Albinsson
e102eef198
bug fixes after refactoring of general call
2018-04-12 21:04:28 +00:00
Simon Albinsson
100b410a1d
Test: Test i2c_generalcall
2018-04-12 21:02:57 +00:00
Simon Albinsson
3599889c8d
Test: adds support for testing i2c reads
2018-04-12 20:48:26 +00:00
Simon Albinsson
afc8f18456
fixes most basic init
2018-04-12 19:52:03 +00:00
Simon Albinsson
9ec514ff92
adding basic tests for smbus
2018-04-12 19:49:43 +00:00
Simon Albinsson
65317ef504
Still dosnt work but now it compiles
2018-04-12 16:10:46 +00:00
Simon Albinsson
4369939459
Adds .gitignore for python and vim files
2018-04-12 16:09:32 +00:00
Simon Albinsson
ceb161c6a8
adds tests for crc
2018-04-12 15:32:43 +00:00
Simon Albinsson
d4dc8220f7
adds class for crc8 calculations
2018-04-12 15:30:49 +00:00
Simon Albinsson
20f98cdf61
Start of init function
...
The first parts of the init function. This should be the most neccesary
info that the class needs.
2018-04-07 22:55:45 +00:00
Simon Albinsson
8415d2594b
Short warning about the general call command
2018-04-07 22:52:33 +00:00
Simon Albinsson
866814fe59
Utility method for generating set-baseline
...
Realy the read/write command should probbably get updated to be able to
tale some additional data for writing but meh... creating an utility
function to generate extra-data is also workable, even if it creates
some unneccesary objects...
2018-04-07 22:38:36 +00:00
Simon Albinsson
3e10e27c85
created class, removed a few unneccesary rows
...
In order to make edits to class readable i commit this mostly white
space edit. Further more it removes a few application specific or
testing lines.
2018-04-07 22:28:33 +00:00
Simon Albinsson
3faf3c621e
adds basic setup.py
2018-04-07 22:23:17 +00:00
Simon Albinsson
b9c17cd791
startng to structure like a real package
2018-04-07 22:19:31 +00:00
Simon Albinsson
d93f14d14f
re ordering of todo
2018-04-07 22:09:27 +00:00
Simon Albinsson
8bff008b36
More stable time keeping and Using new init-functions
...
The old time keeping routine was a bit flaky, this one might blow up in
irritating ways if a cycle takes more than 1 second. Also uses the new
init functions to set up the SGP.
Be ware of the dangerous i2c-general call that resets any device on the
buss that listens to general call.
2018-04-07 22:03:50 +00:00
Simon Albinsson
7f31f5a116
Compoartmentalzation of the init proccess
...
in order to make the start-up code less messy all parts of startup is
devided into its own funciontion
2018-04-07 22:02:07 +00:00
Simon Albinsson
ce65ae86b4
Adds sleep-support to command struct
...
It is cleaner to store the needed wait-time with the struct than to
passit to the read-write function. This change mostly acopmplieshs that
2018-04-07 21:58:00 +00:00
Simon Albinsson
7053a2cba9
Imports json, system libs and so on
...
Ads various imports for time keeping and data persistance
2018-04-07 21:47:40 +00:00
zinob
a8216a8c2f
Minor fixes to readme
2018-03-17 22:24:39 +01:00
Simon Albinsson
97bf4423e4
Adds license
2018-03-17 22:23:53 +01:00
zinob
6b3954a1ff
Fixes some formatting errors in Readme
2018-03-17 22:19:44 +01:00
Simon Albinsson
3cf326b9b3
Updates readme with project description
2018-03-17 22:15:51 +01:00
Simon Albinsson
f3c15d6a80
Rough sketch, working, but no CRC
...
Able to read values but cant save callibration data and does not check
CRC. Also not a library
2018-03-17 21:52:55 +01:00
zinob
f7ffb3d270
Initial commit
2018-03-17 21:50:11 +01:00