Fix sprintf problem in SIM_sun. #1464

This commit is contained in:
John M. Penn 2023-03-01 14:45:23 -06:00
parent 5f6a5de070
commit 539989469c
3 changed files with 3 additions and 8 deletions

View File

@ -31,11 +31,6 @@ if STRIPCHART:
sun_predictor.sun.observer_latitude = trick.sim_services.attach_units("degree" , 29.55298)
sun_predictor.sun.observer_longitude = trick.sim_services.attach_units("degree" , 95.09379)
# Mom's House
#sun_predictor.sun.observer_latitude = trick.sim_services.attach_units("d" , 38.842677)
#sun_predictor.sun.observer_longitude = trick.sim_services.attach_units("d" , 83.19773)
""" ======================================== """
""" TIME ZONE """
""" Pick your time zone by uncommenting the """

View File

@ -63,10 +63,10 @@ int sun_pred_fast_display(
snprintf(tmp_s, sizeof(tmp_s), " AZIMUTH %.3f%d", S->solar_azimuth, DEGREE_SIGN);
}
strcat(message,tmp_s);
snprintf(tmp_s," sizeof(tmp_s), %ls %.3f%d",S->label_Elevation, S->solar_elevation, DEGREE_SIGN);
snprintf(tmp_s, sizeof(tmp_s), " %ls %.3f%d",S->label_Elevation, S->solar_elevation, DEGREE_SIGN);
strcat(message,tmp_s);
send_hs(stdout,"%s\n",message);
fprintf(stdout,"%s\n",message);
return 0;
}

View File

@ -65,7 +65,7 @@ int sun_pred_slow_display(
strcat(message,tmp_s);
snprintf(tmp_s, sizeof(tmp_s), " %lc %5.2f%lc",GREEK_SMALL_LETTER_DELTA, S->declination, DEGREE_SIGN);
strcat(message,tmp_s);
send_hs(stdout,"%s\n",message);
fprintf(stdout,"%s\n",message);
return 0 ;
}