pico-i2c
alanbjohnston 3 years ago committed by GitHub
parent d77d7e756f
commit bfde926bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -571,7 +571,7 @@ void config_telem() {
Serial.println("Configuring for FSK\n"); Serial.println("Configuring for FSK\n");
bitRate = 200; bitRate = 200;
delay_time = 1E6 / bitRate; delay_time = 1E6 / bitRate;
Serial.println(delay_time); // Serial.println(delay_time);
rsFrames = 1; rsFrames = 1;
payloads = 1; payloads = 1;
rsFrameLen = 64; rsFrameLen = 64;
@ -587,13 +587,13 @@ void config_telem() {
// Serial.println(samples); // Serial.println(samples);
bufLen = (frameCnt * (syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen))) * samples); bufLen = (frameCnt * (syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen))) * samples);
bufLen = 970; // 2000; bufLen = 970; // 2000;
Serial.println(bufLen); // Serial.println(bufLen);
samplePeriod = (int) (((float)((syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen)))) / (float) bitRate) * 1000 - 500); samplePeriod = (int) (((float)((syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen)))) / (float) bitRate) * 1000 - 500);
sleepTime = 0.1; sleepTime = 0.1;
// Serial.println(samplePeriod); // Serial.println(samplePeriod);
frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms
Serial.println(frameTime); // Serial.println(frameTime);
// printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", // 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); // bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod);
memset(buffer, 0xa5, sizeof(buffer)); memset(buffer, 0xa5, sizeof(buffer));
@ -602,7 +602,7 @@ void config_telem() {
bitRate = 1200; bitRate = 1200;
// delay_time = (1.0 / 1200.0); // delay_time = (1.0 / 1200.0);
delay_time = 1E6 / bitRate; delay_time = 1E6 / bitRate;
Serial.println(delay_time); // Serial.println(delay_time);
rsFrames = 3; rsFrames = 3;
payloads = 6; payloads = 6;
rsFrameLen = 159; rsFrameLen = 159;
@ -4421,7 +4421,7 @@ void start_clockgen() {
if (clockgen.begin() != ERROR_NONE) if (clockgen.begin() != ERROR_NONE)
{ {
/* There was a problem detecting the IC ... check your connections */ /* There was a problem detecting the IC ... check your connections */
Serial.print("No Si5351 detected ... Check your wiring or I2C ADDR!"); Serial.println("No Si5351 detected ... Check your wiring or I2C ADDR!");
return; return;
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.