You've already forked TEF6686_ESP32
Optimising
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include "Tuner_Patch_Lithio_V205_p512.h"
|
||||
#include <Wire.h>
|
||||
|
||||
bool Data_Accelerator = false;
|
||||
|
||||
const unsigned char tuner_init_tab[] PROGMEM = {
|
||||
7, 0x20, 0x0B, 0x01, 0x03, 0x98, 0x00, 0x00,
|
||||
5, 0x20, 0x14, 0x01, 0x00, 0x00,
|
||||
@@ -72,7 +74,7 @@ bool Tuner_WriteBuffer(unsigned char *buf, uint16_t len) {
|
||||
Wire.beginTransmission(0x64);
|
||||
for (uint16_t i = 0; i < len; i++) Wire.write(buf[i]);
|
||||
uint8_t r = Wire.endTransmission();
|
||||
delayMicroseconds(100);
|
||||
if (!Data_Accelerator) delay(2);
|
||||
return (r == 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef TUNER_INTERFACE_H
|
||||
#define TUNER_INTERFACE_H
|
||||
|
||||
void Tuner_I2C_Init();
|
||||
void Tuner_Patch(byte TEF);
|
||||
void Tuner_Init(const unsigned char *table);
|
||||
@@ -5,3 +8,4 @@ bool Tuner_WriteBuffer(unsigned char *buf, uint16_t len);
|
||||
bool Tuner_ReadBuffer(unsigned char *buf, uint16_t len);
|
||||
bool Tuner_Table_Write(const unsigned char *tab);
|
||||
void Tuner_Reset(void);
|
||||
#endif
|
||||
@@ -675,6 +675,7 @@ void XDRGTKRoutine() {
|
||||
if (scandxmode) cancelDXScan();
|
||||
if (!XDRScan) BWsetRecall = BWset;
|
||||
XDRScan = true;
|
||||
Data_Accelerator = true;
|
||||
|
||||
switch (buff[1]) {
|
||||
case 'a': scanner_start = (atol(buff + 2) + 5) / 10; break;
|
||||
@@ -763,6 +764,7 @@ void XDRGTKRoutine() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
Data_Accelerator = false;
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
|
||||
@@ -15,6 +15,7 @@ extern bool afscreen;
|
||||
extern bool aftest;
|
||||
extern bool autosquelch;
|
||||
extern bool BWreset;
|
||||
extern bool Data_Accelerator;
|
||||
extern bool direction;
|
||||
extern bool externaltune;
|
||||
extern bool fullsearchrds;
|
||||
|
||||
Reference in New Issue
Block a user