Skip to content

Conversation

@flavius-t
Copy link
Contributor

No description provided.

flavius-t and others added 27 commits June 16, 2022 20:03
* update README

* remove install info from tc readme

* TC merge for housekeeping (#44)

* add fault status reading

* add fault mask configuration

* tc module restructuring

* update documentation

* update decimal bit constants

* Tc dev fixes (#36)

* refactor fault reading

* add human readable Fault printing

* add option for less verbose fault reading

* filter out normal status Faults

* refactor fault masking to set individual masks

* Gpio merge for house keeping (#42)

* gpio periphery being added

* gpio periphery being added

* rebase gpio branch

* created gpio folder and files and tests

* Feature branch git action added, gpio command and constants are added

* github action yml changed

* testing GPIO

* gpio bias keyword takenout

* path typeError troubleshooting

* gpio in progress #20

* disable push test until fixing the bug

* Update gpio.py

add all keyword args

* Update gpio.py

passing arguments without keyword

* Update gpio.py

* gpio test issue resolved #20

* working on constants

* Adc rebased and merge to dev (#43)

* added constants #17

* adding Methods to ADCCommand class #17

* added write_register method, testing exception as well #17

* added dataclasses for register configurations, tests are added for testing immutable class #17

* added more registers and tests, #17

* added workflow for CI, #17

* modifying linting requirements

* testing

* changed global user and email

* user name testing

* added constants #17

* adding Methods to ADCCommand class #17

* added write_register method, testing exception as well #17

* added dataclasses for register configurations, tests are added for testing immutable class #17

* added more registers and tests, #17

* modifying linting requirements

* testing

* changed global user and email

* user name testing

* modified readme back to original state

Co-authored-by: SJ Park <sj@SJs-MacBook-Air.local>

* Update README module links (#45)

Adding module link to ADC now that it is merged to dev, and updating other links to use relative link (so it links to folders on the same branch as top-level readme they're being accessed from)

* refactor utilities to support non Enum set_config args (#47)

* refactor utilities to support non Enum set_config args

* added gpio_cofings.py to add configuration data class for dac #40 (#46)

* added gpio_cofings.py to add configuration data class for dac #40

* changed function description

* PR #46  fixes

* steven can't write :(

* filter_dict by value (#53)

* add names to test and lint workflows (#56)

* add names to test and lint workflows

* remove pytest-gpio workflow

* Pytest fix (#57)

* Update adc_commands.py

updated adc_command to fix the pytest issue

* Update adc_commands.py

updated adc_command to fix the pytest issue

* Edgepi gpio dac config (#55)

* gpio-dac-config being implemented

#20,  #48, #49, #51, #16

* testing I2C

* 1. Added gpio config #48
2. edgepi_gpio init method: instantiate super class when I2C gpio group selected and generate pin list #48 #51 #52
3. I2C mocking class for window and Linux environment, #16

* gpio module configurations packed as enum

using enum to check configuration by iterating through the enum class

* filter_dict by value (#53)

* add names to test and lint workflows (#56)

* add names to test and lint workflows

* remove pytest-gpio workflow

* added mock for testing I2C

* gpio-dac-config being implemented

#20,  #48, #49, #51, #16

* testing I2C

* 1. Added gpio config #48
2. edgepi_gpio init method: instantiate super class when I2C gpio group selected and generate pin list #48 #51 #52
3. I2C mocking class for window and Linux environment, #16

* gpio module configurations packed as enum

using enum to check configuration by iterating through the enum class

* added mock for testing I2C

* combined repetitive dataclass

fixed a problem with circular dependency

* fixing pytest failures

Co-authored-by: flavius-t <77416463+flavius-t@users.noreply.github.com>
Co-authored-by: flavius-t <flavius.t@hotmail.com>

* TC Open Circuit (#59)

* add open fault detection mode config

* Fix Linting (#65)

* Fix TestPyPi (#66)

* TC Compute Conversion Time (#63)

* add compute conversion time

* refactor single_sample for time delay computation

* update time conv docstrings

* inflate time delays

* TC Set Temperatures (#60)

* add temperature setting to set_config

* add cold junction temp override method

* add temperature input validation

* add update_registers_from_dict and test

* add temperature range validation by tc type

* add custom exceptions, expand tempcode testing

* add convert from DecBits to float

* add cold-junction overwrite error

* TC Integration Tests (#70)

* separate tests to unit and integration

* add thermocouple integration tests

* refactoring to support tc integration testing

* Edgepi gpio transfer (#62)

* fixed I2C.Message Mocking

* tested transfer function and it is working

* set default in progress

#51, #52, #50, #48

* more commands being added

added more gpio state parameter in I2C info dataclass

* Update edgepi_gpio.py

added todo notes

* set default in progress

* Set default in progress

another GPIO config added to I2CpinInfo dataclass
adding helper methods
read register
and map register to dictionary

* added reg helper class to generate the register dictionary. added another function to split pin list into two separate lists to check whether the gpio group uses two separate I2C expander

* set-default need testing

* set default tested

* fixed I2C.Message Mocking

* tested transfer function and it is working

* set default in progress

#51, #52, #50, #48

* more commands being added

added more gpio state parameter in I2C info dataclass

* Update edgepi_gpio.py

added todo notes

* set default in progress

* Set default in progress

another GPIO config added to I2CpinInfo dataclass
adding helper methods
read register
and map register to dictionary

* added reg helper class to generate the register dictionary. added another function to split pin list into two separate lists to check whether the gpio group uses two separate I2C expander

* set-default need testing

* set default tested

* Update edgepi_tc.py

the __ was deleted by accident

* tests not passing

* testing fixed

* Update test_edgepi_gpio.py

fixed tests

* requested changed from Farzad

* Todos added

* working on todos, changed pin list to be self-explanatory, need to work on __generate_default_reg_dict to be more intuitie

* changed naming conventions and using dictionary instead of list for describing pins

* fixing pylint

* fixing linting issue

* fix I2C test and pylint on linux

* disabled E1101 to go work around the error from mock class

* fixed lint and testing mock

* Unit Test Fixes (#74)

* separate peripherals testing to unit/integration

* testing workflow changes

* Edgepi gpio toggle (#75)

* adding set_gpio function

modified set_default and dgenerate default reg dict
-instead of using list of dictionary, using dictionary format
- set expander pin uses pin_name to set corresponding gpio
#49

* clear expander pin

* Toggle gpio pin added

#49

* pylint passed"

* adding set_gpio function

modified set_default and dgenerate default reg dict
-instead of using list of dictionary, using dictionary format
- set expander pin uses pin_name to set corresponding gpio
#49

* clear expander pin

* Toggle gpio pin added

#49

* pylint passed"

* refactored for-loop

test for __write_changed_values is not added since the function doesn't return any value and only execute the transaction

* Readme added

while working on the readme, i realized the order of AO_ENx pins were reversed. the order is fixed now

* Update edgepi_gpio.py

for loop replaced with a write change value method

* Add Test Coverage (#79)

* add code coverage to unit test workflow

* add workflow status badges

* DAC Interface (#77)

* add set channel power mode

* add set_gain_mode

* add software reset

* add readback

* add code to voltage

* integrate with gpio module

* Dac calibration (#84)

* refactoring calibration parameter dataclass #9

* changed test fixture for dac_command

* calibration parameter refactored

* dac calibration refactored

* Update test_edgepi_dac.py

linter fix

* added and edited suggested comments

* Calibration module (#92)

* #83 creating files

* adding unittest

* Update test_access_eeprom.py

* added unittest & i2c transfer return change

* adding calibration mapping and class

* Update edgepi_calibration.py

todo notes added

* pylint fix

* code review suggestions

* Requested PR fixes

- Nomenclature files
- Reg address name change -> mem_addr
- Device address is a constant now
- EEPROM class

* ADC Interface (#97)

* Adding functions to calibration class (#98)

* adding helper class for calibration process

* adding functions to generate necessary dictionaries

* pylint fixes

* Update test_adc_state.py (#100)

#99

* Get/Set Individual Pin States (#105)

* LED Module (#106)

* Individual channel modification (#108)

* Individual channel modification

#103
- Only single pins gets accessed
- simplified code calculate for now, calibration to be added

* fixed voltage_to_code and code_to_voltage calculation

* applying suggested fix

* Issue102 dac (#109)

* Individual channel modification

#103
- Only single pins gets accessed
- simplified code calculate for now, calibration to be added

* adding get_state() dac

#102 dac get_state is being added

* fixed voltage_to_code and code_to_voltage calculation

* passing pytest

* changed the key from string name to number

* changed get_state function #102 osensa/edgepi-device-manager/issues/3

* pylint fix

* Issue103 adc (#110)

* adc testing being added

* added test

* Individual channel modification (#108)

* Individual channel modification

#103
- Only single pins gets accessed
- simplified code calculate for now, calibration to be added

* fixed voltage_to_code and code_to_voltage calculation

* applying suggested fix

* added todo and fixed pylint

* used enums for pin names

* Update edgepi_adc.py

removed clear exapnder to avoid resetting of Ground reference when a new object is instantiated

* Update edgepi_adc.py (#115)

* Update edgepi_adc.py

To Do added

* Update edgepi_adc.py

have a ruler set for pylint, and still fails on line-too-long :(

* Gpio delete set default (#116)

* deleting obsolete function

* added unit tests for functions

changed gpio pin ordering of DAC module

* Loading DAC related Calibration parameter from the EEPROM (#114)

* dummy functions added for calibration

added logger
added generate calib dictionary functions , logics to be implemented

* unpacking packing added

unpacking: from list of parameter that read from eeprom to a single value
packing : from a value to a list of bytes to load to the eeprom

* calib dictionary generation for dac

* loading calib param added and tested

* Update test_edgepi_calibration.py

updated the unit test for get_calibration_dict. Other module test cases are deleted for now

* PR#114 fix

- added a dictionary of functions
- added more description to the address constants

* Remove ADC Init Configs (#119)

* remove configs from adc init

* rename to private method

* Calibration dac (#120)

* Update edgepi_dac.py

adding calibration classes, need to check dictionary structure. implement DAC_GAIN parameter maybe needed

* DAC calibration updated

#111
- loading of calibration parameter from eeprom
- generation and get calibration dictionary
- check dac_gain state before code2voltage or voltage 2code conversion
- conversion formula edited to accommodate the calibration param and dac gain state

* set/clear internal DAC gain

#76

* Update edgepi_dac.py

PR #120  suggested fix

* constant name change

PR #120  suggested fix

* ADC Differential Reads, RTD Mode (#118)

* remove unused duplicate channel assignment code

* fix pytest discovery error

* add SPI debugging logs

* change rtd_enabled check logic

* diff read constants

* rtd property check, set diff mode

* unit test validate_no_rtd_conflict

* unit test select_differential

* ignore local test scripts

* documentation additions

* opcodes for RTD mode

* doc updates, pytest config

* unit test IDACMUX opcodes

* unit test IDACMAG opcodes

* fix IDACMAG opcode bug

* fix REFMUX opcode bug

* expand REFMUX opcode unit tests, renaming

* uncomment adc config integration tests

* integration test IDACMUX opcodes

* integration test IDACMAG opcodes

* integration test REFMUX opcodes

* integration test select_differential

* add idac channel 9

* fix opcode name, failing unit test

* add rtd mode enums

* add rtd_mode, todos for get_state with caching

* rename __get_rtd_en_status

* fix rtd_mode logic, unit test

* integration test rtd_mode, fix bug

* Remap ADC Multiplexers (#122)

* mux mapping set mux_n to AINCOM

* refactor mux arg handling in __config

* refactor None checking, update docstring

* remove temporary test fix

* remove unnecessary test cases

* I2C set_msg function takes list of addresses (#128)

* #127 added another type for addr parameter of set_read_msg and set_write_msg to accomodate a list of addresses

* | was introduced in python 3.10 but the test automation is using python 3.9

* Calibration suggestion (#129)

* Nov1 code review suggestions

* refactoring eeprom access module to accomodate the hardware change

* EEPROM class is refactored to accomodate the larger memory size #125

* pylint fix

* Eeprom protobuf (#131)

* protobuf implementation

#126 #124

* test added

* pylint fix and update dependencies

* Update requirements_test.txt

* delete Todos

* suggested fixes

* suggested name fix

* generate_calib_param dictionary added (#134)

* generate_calib_param dictionary added

* pytest fix

* suggested fix

- calib_params nomenclature
- better description for docstring

* suggest fix

- calib param dataclass formation done in eeprom class
- removed redundant methods and tests

* ADC Get State (#132)

* refactor get_state to EdgePiADC

* refactor ADCModes

* add get_register_map

* use get_register_map for internal register reads

* refactor ADCState

* use new ADCState for getting state internally

* add get mux states

* refactor state query constants to module

* ADC Calibration (#138)

* added eeprom reading to load calibration parameter

* diff/individual voltage read calibration handling #133

Co-authored-by: sjpark608 <spark@osensa.com>

* fixed typing issue (#136)

#135
added test cases for checking the type

* Add ADC2  (#139)

* add adc-2 to voltage reads, set_config

* dac conversion formula change (#146)

* dac conversion formula change

#143  #144
- added updated serialized file for testing
- updated formula for voltage2code code2voltage
- updated unittest
- added serialized read helper file
- deleted outdated dac_calibration files

* pylint fix

* DAC Enum Args (#152)

* refactor user interface to enum channel args

* GPIO refactoring in progress (#156)

* gpio module refactored

#153

* adding test cases fixing typos

* gpio module refactor

adding edgpi gpio test

* fix suggestions

* RTD Sampling (#160)

* Hardware Tests (#162)

* voltage read-write test

* add test report to gitignore

* custom approx comparator

* move adc conversion time tests

* update hardware test instructions

* move integration tests to new folder

* diff voltage tests

* add adc_2 diff test

* add rtd tests

* bypass rtd validation in mux mapping

* fix rtd temp calculation bug

* GPIO module refactoring intermediate PR (#161)

* refactoring generating pin dictionary to have generic dictionary #154 #155

* generic object instantiation #154 #155

* Update test_dac.py

dict_pin changed to expander_pin_dict after refactor

* lint fix

* Gpio refactor 154 (#167)

* added gpio exception, gpio write, need some testing on the hardware #166 #154 #155

* added set direction in out function, get direction function

* edgepi gpio methods gets enum values typed string

* changed function name used in different modules

* fixed pytest and pylint issues

* added toggle pin

* deleted unused module

* PR #167 suggested fix

- added __pin_name_check()
- added more tests

* GPIO DOUT pin list re-order (#169)

* Update gpio_configs.py

Forgotten change

* fixed LED integration test

* Get State Override Cache (#175)

* add override cache to get state

* Fix Read Voltage Validation (#176)

* fix conv mode validation in read_voltage

* Digital input module (#173)

* adding din module and tests

* Digital input reading #170

* Added test parameters

* added exception and testing

* digital out module #171 (#172)

* Main README Update (#181)

* Update README.md

* update sdk package naming

* update version num

* added README and re-naming module (#182)

* LED Module README (#183)

* Create README.md

* Update README.md

Co-authored-by: sjpark608 <78987042+sjpark608@users.noreply.github.com>
Co-authored-by: SJ Park <sj@SJs-MacBook-Air.local>
Co-authored-by: sjpark608 <spark@osensa.com>
@flavius-t flavius-t self-assigned this Dec 14, 2022
@flavius-t flavius-t merged commit 6fc38f4 into main Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants