Ejemplo n.º 1
0
	void MoSyncCamController::displayMainScreen()
	{
		if ( !isDisplayed(*mCameraScreen) )
		{
			mCameraScreen->show();

			setCurrentScreen(*mCameraScreen);
		}
	}
Ejemplo n.º 2
0
	void MoSyncCamController::imageViewingDone()
	{
		if ( !isDisplayed(*mCameraScreen) )
		{
			mCameraScreen->showWithTransition(mBackwardTransition, SCREEN_TRANSITION_DURATION);

			if ( mDisplayedImageHandle > 0 )
			{
				maDestroyPlaceholder(mDisplayedImageHandle);
				mDisplayedImageHandle = 0;
			}

			setCurrentScreen(*mCameraScreen);
		}
	}
Ejemplo n.º 3
0
	void MoSyncCamController::snapshotDisplayRequested()
	{
		if ( !isDisplayed(*mImageViewerScreen) )
		{
			if ( mLastSnapshotDataHandle > 0 )
			{
				mDisplayedImageHandle = maCreatePlaceholder();

				maCreateImageFromData(
					mDisplayedImageHandle,
					mLastSnapshotDataHandle,
					0,
					maGetDataSize(mLastSnapshotDataHandle));

				mImageViewerScreen->setImageWithData(mDisplayedImageHandle);
				mImageViewerScreen->showWithTransition(mForwardTransition, SCREEN_TRANSITION_DURATION);

				setCurrentScreen(*mImageViewerScreen);
			}
		}
	}
Ejemplo n.º 4
0
void TBigTime::Draw()
{
//  dbgprintln("TBigTime draw");
  char  ci[24] ,ct[8];
  uint16_t atx;
  if (!active) return;
  if (!isDisplayed())
  {
    Parent->fillRect(0,top,WIDTH,HEIGHT-LHEIGHT,color) ;
    Parent->drawRect(0,top,WIDTH,HEIGHT-LHEIGHT,ILI9341_WHITE) ;
	displayed = true;
//	return;
  }
  DateTime dt0(rtc.now());

  Parent->setTextColor(ILI9341_WHITE);
  Parent->setFont(fixednums15x31);
  Parent->setTextArea(0, 0, WIDTH, HEIGHT);
  sprintf(ci,"%02d:%02d:%02d", dt0.hour(),dt0.minute(),dt0.second());
  Parent->fillRect  (WIDTH/2 -((fixednums15x31[2]*strlen(ci))/2 ),HEIGHT/3,fixednums15x31[2]*(strlen(ci)+1),fixednums15x31[3],color) ;
  Parent->printAt(ci,WIDTH/2 -((fixednums15x31[2]*strlen(ci))/2 ),HEIGHT/3);

  Parent->setFont(Arial_bold_14);
  sprintf(ci,"%02d/%02d/%04d", dt0.day(),dt0.month(),dt0.year()); 
  atx = WIDTH/2 -((Arial_bold_14[2]*strlen(ci))/2 );
  Parent->fillRect  (atx,(HEIGHT/3) +50,Arial_bold_14[2]*(strlen(ci)+1),Arial_bold_14[3],color) ;
  Parent->printAt(ci,atx,(HEIGHT/3) +50);

  rtc.readTemperature(ct);
  sprintf(ci,"%s Celsius",ct);
  Parent->fillRect  (atx,(HEIGHT/3) +80,Arial_bold_14[2]*(strlen(ci)+1),Arial_bold_14[3],color) ;
  Parent->printAt(ci,atx,(HEIGHT/3) +80);


  Parent->setTextColor(ILI9341_GRAY);
  if (!Options.isActive()) Parent->printAt("Set: touch here",4*WIDTH/8 ,(HEIGHT-30));
}