| | |
| | | ImageCalibrated = true; |
| | | } |
| | | |
| | | freq = ( uint32_t )( ( double )frequency / ( double )FREQ_STEP ); |
| | | freq = ( uint32_t ) ( frequency * 4 / 15625 * 4096 ); // ( ( double )frequency / ( double )FREQ_STEP ); |
| | | buf[0] = ( uint8_t )( ( freq >> 24 ) & 0xFF ); |
| | | buf[1] = ( uint8_t )( ( freq >> 16 ) & 0xFF ); |
| | | buf[2] = ( uint8_t )( ( freq >> 8 ) & 0xFF ); |
| | |
| | | { |
| | | case PACKET_TYPE_GFSK: |
| | | n = 8; |
| | | tempVal = ( uint32_t )( 32 * ( ( double )XTAL_FREQ / ( double )modulationParams->Params.Gfsk.BitRate ) ); |
| | | tempVal = ( uint32_t )( 32 * XTAL_FREQ / modulationParams->Params.Gfsk.BitRate ); |
| | | buf[0] = ( tempVal >> 16 ) & 0xFF; |
| | | buf[1] = ( tempVal >> 8 ) & 0xFF; |
| | | buf[2] = tempVal & 0xFF; |
| | | buf[3] = modulationParams->Params.Gfsk.ModulationShaping; |
| | | buf[4] = modulationParams->Params.Gfsk.Bandwidth; |
| | | tempVal = ( uint32_t )( ( double )modulationParams->Params.Gfsk.Fdev / ( double )FREQ_STEP ); |
| | | tempVal = ( uint32_t )( modulationParams->Params.Gfsk.Fdev * 4/ 15625 * 4096); //( double )modulationParams->Params.Gfsk.Fdev / ( double )FREQ_STEP |
| | | buf[5] = ( tempVal >> 16 ) & 0xFF; |
| | | buf[6] = ( tempVal >> 8 ) & 0xFF; |
| | | buf[7] = ( tempVal& 0xFF ); |