return false;
}
+bool Panel::is_suspended() const
+{
+ void *returned_data;
+
+ bool ok = PublicData::get_value( player_checksum, is_suspended_checksum, &returned_data );
+ if (ok) {
+ bool b = *static_cast<bool *>(returned_data);
+ return b;
+ }
+ return false;
+}
+
void Panel::set_playing_file(string f)
{
// just copy the first 20 characters after the first / if there
// file playing from sd
bool is_playing() const;
+ bool is_suspended() const;
void set_playing_file(string f);
const char* get_playing_file() { return playing_file; }
const char *WatchScreen::get_status()
{
- if (THEPANEL->hasMessage()) {
+ if (THEPANEL->hasMessage())
return THEPANEL->getMessage().c_str();
- }
- if (THEPANEL->is_halted()) {
+ if (THEPANEL->is_halted())
return "HALTED Reset or M999";
- }
if (THEKERNEL->pauser->paused())
return "Paused";
+ if (THEPANEL->is_suspended())
+ return "Suspended";
+
if (THEPANEL->is_playing())
return THEPANEL->get_playing_file();
- if (!THEKERNEL->conveyor->is_queue_empty()) {
+ if (!THEKERNEL->conveyor->is_queue_empty())
return "Printing";
- }
const char *ip = get_network();
if (ip == NULL) {
if(!pdr->starts_with(player_checksum)) return;
- if(pdr->second_element_is(is_playing_checksum)) {
+ if(pdr->second_element_is(is_playing_checksum) || pdr->second_element_is(is_suspended_checksum)) {
static bool bool_data;
- bool_data = this->playing_file;
+ bool_data = pdr->second_element_is(is_playing_checksum) ? this->playing_file : this->suspended;
pdr->set_data_ptr(&bool_data);
pdr->set_taken();
#define player_checksum CHECKSUM("player")
#define is_playing_checksum CHECKSUM("is_playing")
+#define is_suspended_checksum CHECKSUM("is_suspended")
#define abort_play_checksum CHECKSUM("abort_play")
#define get_progress_checksum CHECKSUM("progress")