Changeset - 58f85a2f51f0
[Not reviewed]
cortex-f0
0 1 0
Ethan Zonca - 10 years ago 2015-03-29 22:13:29
ez@ethanzonca.com
Remove wait on USB busy. Note that previous commit introduced a fairly nasty bug where displayed temp is only updated if USB CDC is connected
1 file changed with 1 insertions and 1 deletions:
main.c
1
1
0 comments (0 inline, 0 general)
main.c
Show inline comments
 
@@ -318,25 +318,25 @@ void process()
 
        HAL_GPIO_WritePin(SSR_PIN, 0);
 
    }
 
 
    if(ticks - last_vcp_tx > VCP_TX_FREQ)
 
    {
 
        // Print temp to cdc
 
        char tempstr[16];
 
        itoa_fp(status.temp, status.temp_frac, tempstr);
 
        uint8_t numlen = strlen(tempstr);
 
        tempstr[numlen] = '\r';
 
        tempstr[numlen+1] = '\n';
 
 
        while(CDC_Transmit_FS(tempstr, numlen+2) == USBD_BUSY);
 
        CDC_Transmit_FS(tempstr, numlen+2);
 
       // while(CDC_Transmit_FS("\r\n", 2) == USBD_BUSY);
 
 
        last_vcp_tx = ticks;
 
    }
 
}
 
 
void save_settings()
 
{
 
/*
 
   Minimal_EEPROM_Unlock();
 
    // Try programming a word at an address divisible by 4
 
    Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_BOOTTOBREW, boottobrew);
0 comments (0 inline, 0 general)