Update main.c fix if defined

master-ff
Alan Johnston 6 months ago committed by GitHub
parent a5cebd68fd
commit a867afebdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2351,7 +2351,7 @@ void get_tlm_fc() { // FunCube Mode telemetry generation
source_bytes[1] = 0x10 ; // extended JY-1 - works, no documentation source_bytes[1] = 0x10 ; // extended JY-1 - works, no documentation
int extended = 1; int extended = 1;
#endif #endif
#if defined FC_SIM || JY_1 #if defined(FC_SIM) || defined(JY_1)
// if (sequence > 10) { // if (sequence > 10) {
if (image_file == NULL) { if (image_file == NULL) {
image_file = fopen("/home/pi/CubeSatSim/image_file.bin", "r"); image_file = fopen("/home/pi/CubeSatSim/image_file.bin", "r");
@ -2407,7 +2407,7 @@ void get_tlm_fc() { // FunCube Mode telemetry generation
// printf("X %x Y %x Z %x B %x\n", x, y, z, b); // printf("X %x Y %x Z %x B %x\n", x, y, z, b);
// printf("iX %x iY %x iZ %x iB %x iC\n", ix, iy, iz, ib, ic); // printf("iX %x iY %x iZ %x iB %x iC\n", ix, iy, iz, ib, ic);
#if defined JY_1 || FC_SIM #if defined(FC_SIM) || defined(JY_1)
source_bytes[extended + FC_EPS + 0] = 0xff & (x >> 6); // Vx source_bytes[extended + FC_EPS + 0] = 0xff & (x >> 6); // Vx
source_bytes[extended + FC_EPS + 1] = 0xfc & (x << 2); source_bytes[extended + FC_EPS + 1] = 0xfc & (x << 2);
source_bytes[extended + FC_EPS + 1] = source_bytes[extended + FC_EPS + 1] | (0x03 & (y >> 12)); source_bytes[extended + FC_EPS + 1] = source_bytes[extended + FC_EPS + 1] | (0x03 & (y >> 12));

Loading…
Cancel
Save

Powered by TurnKey Linux.