Update cubesatsim.ino

pull/153/head
alanbjohnston 4 years ago committed by GitHub
parent cbfc76f25c
commit 3ccbe7f4c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -108,7 +108,7 @@ void setup() {
Serial.println(samplePeriod);
frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms
Serial.println(frameTime);
// printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n",
// bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod);
} else if (mode == BPSK) {
@ -755,8 +755,8 @@ void get_tlm_fox() {
// printf("\n\nValue of ctr after header: %d Buffer Len: %d\n\n", ctr, buffSize);
/// #endif
Serial.println(10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples);
// for (i = 1; i <= (10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // 572
for (i = 1; i <= ((headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // Not 10 * anymore 572
for (i = 1; i <= (10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // 572
// for (i = 1; i <= ((headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // Not 10 * anymore 572
{
write_wave(ctr, buffer);
if ((i % samples) == 0) {
@ -795,9 +795,9 @@ void write_wave(int i, short int *buffer)
{
if (mode == FSK)
{
if ((ctr - flip_ctr) < smaller)
buffer[ctr++] = (short int)(0.1 * phase * (ctr - flip_ctr) / smaller);
else
// if ((ctr - flip_ctr) < smaller) // No wave shaping
// buffer[ctr++] = (short int)(0.1 * phase * (ctr - flip_ctr) / smaller);
// else
buffer[ctr++] = (short int)(0.25 * amplitude * phase);
}
else

Loading…
Cancel
Save

Powered by TurnKey Linux.