|
|
|
|
@ -1,39 +1,22 @@
|
|
|
|
|
/*
|
|
|
|
|
* Generates telemetry for CubeSat Simulator
|
|
|
|
|
* Displays voltage and current sensors for CubeSatSim
|
|
|
|
|
*
|
|
|
|
|
* Copyright Alan B. Johnston
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*
|
|
|
|
|
* INA219 Raspberry Pi wiringPi code is based on Adafruit Arduino wire code
|
|
|
|
|
* from https://github.com/adafruit/Adafruit_INA219.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
//#include <fcntl.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
//#include <unistd.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "status.h"
|
|
|
|
|
#include "ax5043.h"
|
|
|
|
|
#include "ax25.h"
|
|
|
|
|
#include "spi/ax5043spi.h"
|
|
|
|
|
#include <wiringPiI2C.h>
|
|
|
|
|
#include <wiringPi.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
#include "Adafruit_INA219.h" // From Adafruit INA219 library for Arduino
|
|
|
|
|
//#include "status.h"
|
|
|
|
|
//#include "ax5043.h"
|
|
|
|
|
//#include "ax25.h"
|
|
|
|
|
//#include "spi/ax5043spi.h"
|
|
|
|
|
//#include <wiringPiI2C.h>
|
|
|
|
|
//#include <wiringPi.h>
|
|
|
|
|
//#include <time.h>
|
|
|
|
|
//#include <math.h>
|
|
|
|
|
//#include "Adafruit_INA219.h" // From Adafruit INA219 library for Arduino
|
|
|
|
|
|
|
|
|
|
#define A 1
|
|
|
|
|
#define B 2
|
|
|
|
|
|