switch( line ){
case 0: this->panel->lcd->printf("H%03d/%03dc B%03d/%03dc", this->hotendtemp, this->hotendtarget, this->bedtemp, this->bedtarget); break;
case 1: this->panel->lcd->printf("X%4d Y%4d Z%7.2f", (int)round(this->pos[0]), (int)round(this->pos[1]), this->pos[2]); break;
- case 2: this->panel->lcd->printf("%3d%% %2d:%02d %3d%% sd", this->current_speed, this->elapsed_time/60, this->elapsed_time%60, this->sd_pcnt_played); break;
+ case 2: this->panel->lcd->printf("%3d%% %2ul:%02ul %3u%% sd", this->current_speed, this->elapsed_time/60, this->elapsed_time%60, this->sd_pcnt_played); break;
case 3: this->panel->lcd->printf("%19s", this->get_status()); break;
}
}
int result = fseek(this->current_file_handler, 0, SEEK_END);
if (0 != result){
stream->printf("WARNING - Could not get file size\r\n");
- file_size= -1;
+ file_size= 0;
}else{
file_size= ftell(this->current_file_handler);
fseek(this->current_file_handler, 0, SEEK_SET);
}
if(file_size > 0) {
- int est= -1;
+ unsigned long est= 0;
if(this->elapsed_secs > 10) {
- int bytespersec= played_cnt / this->elapsed_secs;
+ unsigned long bytespersec= played_cnt / this->elapsed_secs;
if(bytespersec > 0)
est= (file_size - played_cnt) / bytespersec;
}
- int pcnt= (file_size - (file_size - played_cnt)) * 100 / file_size;
+ unsigned int pcnt= (file_size - (file_size - played_cnt)) * 100 / file_size;
// If -b or -B is passed, report in the format used by Marlin and the others.
if ( options.find_first_of("Bb") == string::npos ){
- stream->printf("%d %% complete, elapsed time: %d s", pcnt, this->elapsed_secs);
+ stream->printf("%u %% complete, elapsed time: %lu s", pcnt, this->elapsed_secs);
if(est > 0){
- stream->printf(", est time: %d s", est);
+ stream->printf(", est time: %lu s", est);
}
stream->printf("\r\n");
}else{
- stream->printf("SD printing byte %ld/%ld\r\n", played_cnt, file_size);
+ stream->printf("SD printing byte %lu/%lu\r\n", played_cnt, file_size);
}
}else{
StreamOutput* current_stream;
StreamOutput* reply_stream;
FILE* current_file_handler;
- long file_size, played_cnt;
- int elapsed_secs;
+ unsigned long file_size, played_cnt;
+ unsigned long elapsed_secs;
};
#endif // PLAYER_H