-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPU6050 #35
base: dev
Are you sure you want to change the base?
MPU6050 #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
I have one idea to change package structure.
To have something like:
(names are from my bad memory and can be wrong:)) |
Nice idea! Now the number of sensors is growing up, we need to organize them. What do you think to put these classes inside a package? They are in most cases, 1 class in 1 package. Maybe could be:
|
Hi Alex
ср, 7 авг. 2019 г., 12:48 oliveiraallex <notifications@github.com>:
Nice idea! Now the number of sensors is growing up, we need to organize
them.
What do you think to put these classes inside a package? They are in most
cases, 1 class in 1 package. Maybe could be:
'PharoThings-Devices-WeatherSensors'
- 'PotMCP9808Device'
- 'PotBME280Device'
'PharoThings-Devices-LCD'
- 'PotLCDHD44780'
- PotLCDHD44780Gpio
- PotLCD1602Device
- PotLCDHD44780I2C
- PotLCD1602DeviceI2C
'PharoThings-Devices-SpaceSensor'
- 'PotADXL345Device'
- 'PotHCSR04Device'
- 'PotMPU6050Device'
This looks good.
Originally separate packages were to allow single device configuration (to
not include unneeded code). But it is probably not really important as
devices are quite simple classes.
Nice thing with "composing" packages: no need to change the baseline.
So I am with your proposal
…
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#35?email_source=notifications&email_token=AB6FVIHOBYOHNGHUHMO42DLQDKZA5A5CNFSM4IJYDUCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3YEFBQ#issuecomment-519062150>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6FVIEKMBZCRO6ZUTLEJB3QDKZA5ANCNFSM4IJYDUCA>
.
|
@@ -3,5 +3,9 @@ readRegisters: anHex | |||
| h l value | | |||
h := i2cConnection read8BitsAt: anHex. | |||
l := i2cConnection read8BitsAt: anHex + 1. | |||
(h == 0 & l == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have more meaningful names for h and l it would be much better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to improve it. I rewrote this drive from scratch, I'm just finishing some adjusts to push it again.
@dionisiydk do you think we can change the name pattern of devices class to start with the word PotDevicexxx instead of PotxxxDevice? Sometimes I forget the name of the sensor and should be better they be shown in the autocompletion when type PotDevice: if it's ok, I'm going to open a new PR to this and to organize the packages, as we talk before. |
Driver to sensor MPU6050 accelerometer/gyroscope