PMU:Bugfix: incorrect data sent when frequency set to floating point

This commit is contained in:
karthikmurakonda 2022-10-27 15:44:12 +05:30
parent 1a80ce316d
commit b44f55a704
1 changed files with 5 additions and 4 deletions

View File

@ -646,13 +646,14 @@ void generate_data_frame()
else /* Insert Floating point Frequency & DFrequency values in data frame */ else /* Insert Floating point Frequency & DFrequency values in data frame */
{ {
/* For rendom values of FREQ & DFREQ */ /* For rendom values of FREQ & DFREQ */
freq_f = (rand() % 5 + 1)*100; freqF = (rand() % 5 + 1)*100;
li2c(freq_f, df_temp_1); f2c(freqF, df_temp_1);
B_copy(data_frm, df_temp_1, indx, 4); B_copy(data_frm, df_temp_1, indx, 4);
indx = indx + 4; indx = indx + 4;
dfreq_f = (rand() % 5 + 1)*0.00639; float dfreqF = 0;
i2c(dfreq_f, df_temp_1); dfreqF = (rand() % 5 + 1)*0.00639;
i2c(dfreqF, df_temp_1);
B_copy(data_frm, df_temp_1, indx, 4); B_copy(data_frm, df_temp_1, indx, 4);
indx = indx + 4; indx = indx + 4;
} }