- tx_buffer[1] = (coin_value/10000)%10;
- tx_buffer[2] = (coin_value/1000)%10;
- tx_buffer[3] = (coin_value/100)%10;
- tx_buffer[4] = (coin_value/10)%10;
- tx_buffer[5] = coin_value%10;
- tx_buffer[6] = '\n';
- tx_buffer[7] = 0;
+ tx_buffer[1] = have_change?'0':'1';
+ tx_buffer[2] = (coin_value/10000)%10;
+ tx_buffer[3] = (coin_value/1000)%10;
+ tx_buffer[4] = (coin_value/100)%10;
+ tx_buffer[5] = (coin_value/10)%10;
+ tx_buffer[6] = coin_value%10;
+ tx_buffer[7] = '\n';
+ tx_buffer[8] = 0;