Ver código fonte

Fix USB flightsim on AVR with newer Arduino

main
PaulStoffregen 9 anos atrás
pai
commit
179953284a
2 arquivos alterados com 5 adições e 5 exclusões
  1. +1
    -1
      usb_flightsim/usb.c
  2. +4
    -4
      usb_flightsim/usb_api.cpp

+ 1
- 1
usb_flightsim/usb.c Ver arquivo

@@ -73,7 +73,7 @@ static const uint8_t PROGMEM device_descriptor[] = {
};


static uint8_t PROGMEM rawhid_hid_report_desc[] = {
static const uint8_t PROGMEM rawhid_hid_report_desc[] = {
0x06, 0x1C, 0xFF, // Usage page = 0xFF1C
0x0A, 0x39, 0xA7, // Usage = 0xA739
0xA1, 0x01, // Collection 0x01

+ 4
- 4
usb_flightsim/usb_api.cpp Ver arquivo

@@ -67,7 +67,7 @@ void FlightSimCommand::identify(void)
uint8_t len, buf[6];

if (!FlightSim.enabled || !name) return;
len = strlen_P((const prog_char*)name);
len = strlen_P((const char *)name);
buf[0] = len + 6;
buf[1] = 1;
buf[2] = id;
@@ -111,7 +111,7 @@ void FlightSimInteger::identify(void)
uint8_t len, buf[6];

if (!FlightSim.enabled || !name) return;
len = strlen_P((const prog_char*)name);
len = strlen_P((const char *)name);
buf[0] = len + 6;
buf[1] = 1;
buf[2] = id;
@@ -174,7 +174,7 @@ void FlightSimFloat::identify(void)
uint8_t len, buf[6];

if (!FlightSim.enabled || !name) return;
len = strlen_P((const prog_char*)name);
len = strlen_P((const char *)name);
buf[0] = len + 6;
buf[1] = 1;
buf[2] = id;
@@ -412,7 +412,7 @@ send:
void FlightSimClass::xmit(const uint8_t *p1, uint8_t n1, const _XpRefStr_ *p2, uint8_t n2)
{
uint8_t intr_state, total, avail;
const prog_char *s2 = (const prog_char *)p2;
const char *s2 = (const char *)p2;

total = n1 + n2;
if (total > FLIGHTSIM_TX_SIZE) return;

Carregando…
Cancelar
Salvar