Skip to content

Commit

Permalink
Fixed problem with uint8 (#986)
Browse files Browse the repository at this point in the history
* Initial Version of AStarBox

Initial version of AStarBox as a 3rd-party driver.

* New version of AStarBox.cpp

New version detects if there is a problem or not with the I2C connection.

Also, changed the names to be consistent with Rodolphe's files. (AStarBox vs CAStarBox), and changed astarbox to indi-astarbox.

* Update README

Update to improve format.

* Update README.md

Again change format.

* Another update

Formatting again

* And again

Another format change.

* Hopefully final update of README

I hope I have this right now!

* Readme

Getting name right in Readme

* Refactor of AStarBox.cpp

Called openAllPorts into connect so can use results to indicate whether connection successful  or not.

Moved getPortPWM for ports 5 and 6 into connect too - when in openAllPports m_bLinked was false at that point so no values collected.

Now called after m_bLlinked is true so that values are collected.

* Merged Rodolphe's updates and mine

Merged Rodolphe's updates and mine.

m_bPortsOpen is tested before opening all ports, but getting PWM5 and 6 is now in connect.

* Tidied up port numbers

Replaced 5 and 6 by their ENUMS instead for consistency.

* Changed logic when PWM percent is zero

Previously, setting PWM to zero turned the port off. However, this prevented the status from being read so that if changed elsewhere, it would not be picked up.

Now, the ports are left on though with power of zero (same as turned off from a physical perspective).

Also, tidied up the return codes from setPortPWMDutyCyclePercent since this returns an integer rather than a bool,

* First Pass Debian Package

First pass debian package. Copied from indi-asi-power.

* Updated rules file

Changed to refer to indi-astarbox, rather than indi-air-power.

* Updated changelog

Updated channgelog - changed time from +100 to +0100 to put it in the correct format.

* Updated to include <cstdint>

Now defined u_int8 and 16.
  • Loading branch information
mcgillca authored Oct 2, 2024
1 parent 20d7263 commit add1094
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions indi-astarbox/mcp3421.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ int mcp3421::openMCP3421()
}
else
return nErr;

return nErr;

}

int mcp3421::closeMCP3421()
Expand Down
1 change: 1 addition & 0 deletions indi-astarbox/mcp3421.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <iostream>
#include <fcntl.h>
#include <unistd.h>
#include <cstdint>
#include <sys/ioctl.h>

#define ADC_ADDR0 0x68
Expand Down

0 comments on commit add1094

Please sign in to comment.