Our clock project

Dependencies:   SPI_TFT_ILI9341 TFT_fonts Adafruit_RTCLib RTC-DS1307 TSI

IoT Clock

We have been given a task to design a clock with internet features, the 'Internet Clock'. First of all, we identified what features we want:

Display: Split into 4 parts:

  • Analogue clock - the good ol' fashioned circle display, complete with minute, hour and second hands.
  • Digital clock - equipped with date for the modern human.
  • Weather display - for those who cannot be bothered to look out of the window.
  • Alarm - just what you need when you have to get up or be somewhere.

Wifi module:

  • For collecting data for weather, alarm times and so it can be an 'Internet Clock'.

Speaker:

  • To make the annoying sound to let you know your alarm is going off.

Range finder:

  • To wave your hand in front of to turn the alarm off, because pressing a button is too last centurary.

The roles:

  • Soroush's first task was to get the LCD screen to work. Meanwhile Adam sorted out the speaker system.
  • When these were done, Adam worked on the screen to display a clock face and date/year. Soroush then connected the wifi module to extract data for weather, location and date. /media/uploads/amilner1/img_0285.jpg Connecting the wifi module.
  • The next part was to get the range-finder hooked up and responding to a hand passing, and switch the alarm off.
  • Finally, it was time for assembly.

Difficulties: There were many issues faced throughout the project. First of all, Adam's coding knowledge was a lot less than Soroush's which slowed down some completion of tasks. Although, this did help us sort out the roles. Next was the wifi connectivity which caused several problems during the project, and we couldn't get the connection or fetch data, which further slowed the process. Another difficulty was finding the range-finder's set-up page for mbed. However, when we got past these set backs we managed to put everything together quickly, /media/uploads/amilner1/img_0294.jpg All the hardware wired in.

Outcome:

  • Our LCD screen has 2 displays:
  1. 1 An analogue clock filling the screen.

/media/uploads/amilner1/img_0304.jpg

  1. 2 An analogue clock, date and year, weather and location, and alarm time.

/media/uploads/amilner1/img_0305.jpg

This is changed by holding (not passing quickly) your hand in front of the range-finder.

  • An RTC to keep track of the time rather than collecting the information from then internet. However, we have had a lot of problems setting this up, and it doesn't seem to respond.
  • Wifi is also not connected, so we have the default date, time, weather and location.
  • You are able to change the alarm time by swiping the touch pad on the back.

Perhaps given more time we'd be able to fix these problems. But a key point is that we have got all the other features working, except the correct time. /media/uploads/amilner1/img_0303.jpg

Display.cpp

Committer:
sfaghihi
Date:
2017-05-25
Revision:
19:450dbcda696e
Parent:
18:2afeed90c051
Child:
20:e8ff6955c24e

File content as of revision 19:450dbcda696e:


#include "Display.h"

static const struct {
  unsigned int   width;
  unsigned int   height;
  unsigned int   bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ 
  unsigned char  pixel_data[80 * 80 * 2 + 1];
} weat_ico = {
  80, 80, 2,
  "\"\000\"\000\"\000\"\000\"\000#\000#\000$\000$\000%\000%\000F\000F\000G\000H\000H\000I\000I\000J\000j\000j\000k\000k"
  "\000k\000l\000l\000l\000l\000l\000m\000m\000m\000m\000\215\020\215\020m\000m\000m\000m\000m\000m\000m\000m\000m\000"
  "m\000m\000m\000m\000l\000l\000l\000l\000l\000k\000k\000k\000j\000j\000I\000I\000H\000H\000G\000G\000F\000E\000%\000$\000"
  "$\000#\000#\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000#\000#\000$\000$\000"
  "%\000F\000F\000G\000G\000H\000I\000I\000j\000j\000k\000k\000k\000l\000l\000l\000l\000m\000m\000m\000m\000m\000m\010m\000"
  "\255\030N\000.\000\316\030n\000n\000n\000n\000n\000n\000n\000n\000m\000m\000m\000m\000m\000m\000m\000l\000l\000l"
  "\000l\000k\000k\000k\000j\000J\000I\000I\000H\000H\000G\000F\000F\000%\000%\000$\000#\000#\000#\000\"\000\"\000\"\000\""
  "\000\"\000\"\000\"\000\"\000\"\000\"\000#\000#\000$\000%\000%\000F\000F\000G\000H\000H\000I\000I\000j\000j\000k\000k"
  "\000l\000l\000l\000m\000m\000m\000m\000m\000m\000n\000n\000n\000\256\030\016\000n\000\316\040\017\000\256\030"
  "n\000\216\010\216\000\216\000\216\000\216\000\216\000n\000n\000n\000n\000m\000m\000m\000m\000m\000m\000l\000"
  "l\000l\000k\000k\000k\000j\000J\000I\000H\000H\000G\000G\000F\000%\000%\000$\000$\000#\000#\000\"\000\"\000\"\000\"\000"
  "\"\000\"\000\"\000\"\000#\000#\000$\000%\000E\000F\000G\000G\000H\000I\000I\000j\000j\000k\000k\000l\000l\000l\000m\000"
  "m\000m\000m\000m\000n\000n\000n\000\216\000n\000\317\030\017\000-b\305\354\003\365\355\212\020\000\317"
  "\040\217\000\217\010\217\010\217\010\217\010\217\010\217\010\217\010\217\000\216\000\216"
  "\000n\000n\000n\000m\000m\000m\000m\000l\000l\000l\000k\000k\000j\000j\000I\000I\000H\000G\000G\000F\000E\000%\000$\000$"
  "\000#\000#\000\"\000\"\000\"\000\"\000\"\000\"\000#\000#\000$\000%\000%\000F\000G\000G\000H\000I\000I\000j\000k\000k"
  "\000l\000l\000l\000m\000m\000m\000m\000n\000n\000\216\000\216\000\217\000\217\010\217\010\217\010\260"
  "\020\020\000\306\344\200\375`\375\"\365\217I\021\000\260\030\220\010\220\010\220\010"
  "\220\010\220\010\220\010\220\010\217\010\217\010\217\010\217\010\216\000\216\000n\000n"
  "\000m\000m\000m\000m\000l\000l\000l\000k\000k\000j\000J\000I\000H\000H\000G\000F\000F\000%\000$\000$\000#\000#\000\"\000"
  "\"\000\"\000\"\000#\000#\000$\000%\000E\000F\000G\000H\000H\000I\000J\000j\000k\000k\000l\000l\000m\000m\000m\000m\000"
  "n\000n\000\216\000\217\000\217\010\217\010\217\010\220\010\220\000\360\040\021\000\214\253"
  "`\375B\375B\375\200\375+\304\022\000\361\040\221\000\221\010\221\010\221\010\221\010"
  "\221\010\221\010\220\010\220\010\220\010\220\010\217\010\217\010\217\010\216\000n\000"
  "n\000m\000m\000m\000m\000l\000l\000k\000k\000j\000j\000I\000H\000H\000G\000F\000F\000%\000$\000$\000#\000#\000\"\000\""
  "\000\"\000#\000$\000%\000E\000F\000G\000H\000H\000I\000j\000j\000k\000l\000l\000l\000m\000m\000m\000n\000n\000\216\000"
  "\217\010\217\010\217\010\220\010\220\010\220\010\221\010\261\020\022\000\221I\003\365"
  "`\375@\375@\375@\375@\375pr\023\000\362\040\222\010\222\010\222\010\222\010\222\010"
  "\222\010\221\010\221\010\221\010\221\010\220\010\220\010\217\010\217\010\217\010\216"
  "\000n\000n\000m\000m\000m\000l\000l\000l\000k\000k\000j\000I\000I\000H\000G\000F\000F\000%\000$\000$\000#\000#\000\"\000"
  "\"\000$\000%\000E\000F\000G\000H\000H\000I\000j\000k\000k\000l\000l\000m\000m\000m\000m\000n\000\216\000\217\000\217"
  "\010\217\010\220\010\220\010\221\010\221\010\221\010\222\010\362\040\023\000\014\304`"
  "\375#\375B\375B\375C\375`\375\212\334\024\000\324\030\264\010\263\010\263\010\263"
  "\010\263\010\263\010\222\010\222\010\222\010\222\010\221\010\221\010\220\010\220\000"
  "\220\000\217\010\217\010\216\000n\000n\000m\000m\000m\000l\000l\000k\000k\000j\000I\000I\000H\000G\000F\000F"
  "\000%\000$\000$\000#\000\"\000\"\000%\000E\000F\000G\000H\000H\000I\000j\000k\000k\000l\000l\000\255\030\315\040"
  "\355\040\315\040\216\010n\000\217\000\217\010\220\010\220\010\221\010\221\010\222\010"
  "\222\010\222\010\323\030\024\000qr`\375`\375`\375`\375`\375`\375`\375`\375\021\223"
  "\025\000\024!\264\010\264\010\264\010\264\010\264\010\264\010\263\010\263\010\263\010"
  "\222\010\222\000\261\020\361\040\360(\260\030\217\000\217\010\217\000\216\000n\000m\000m\000"
  "m\000l\000l\000k\000k\000j\000I\000I\000H\000G\000F\000F\000%\000$\000#\000#\000\"\000%\000F\000G\000H\000H\000I\000j\000"
  "k\000k\000l\000l\000\255\020\015\000\016\000\016\000\017\000o\000\357\040\320\030\220\010\221\000\221"
  "\010\222\010\222\010\263\010\263\010\263\010\324\030\024\000k\324\040\375\310\354\251"
  "\344\252\334\252\334\251\344\350\354\"\375\347\354\365\040\226\000\325\020\265"
  "\010\265\010\265\010\265\010\265\010\264\010\264\010\264\020\363\040\363\040\063\000\022"
  "\000\022\000\021\000\260\020\220\000\217\010\217\010\216\000n\000m\000m\000m\000l\000l\000k\000k\000j\000"
  "I\000I\000H\000G\000F\000%\000%\000$\000#\000#\000F\000G\000H\000H\000I\000j\000k\000k\000l\000l\000\255\030\015\000"
  "\253\202G\324\351\273\215z\017\000\021\000\021\000\321\030\361\040\222\010\263\010\263"
  "\010\264\010\264\010\264\020\325\020\025)Tj\225I\326\020\026\000\026\000\027\000\026\000\026"
  "!\265I\224zv\071\267\000\326\020\266\010\266\010\266\010\266\010\266\010\325\030\025"
  "!\265\000\025\000\025\000\063)\017\223\255\263\360Y\022\000\261\030\220\000\220\010\217\010"
  "\216\010\216\000n\000m\000m\000l\000l\000k\000k\000j\000I\000I\000H\000G\000F\000%\000%\000$\000#\000G\000G\000H\000"
  "I\000j\000k\000k\000l\000l\000\215\020\015\000\355\040\003\365\200\375`\375@\375\306\344\314"
  "\263\060j\022\000\023\000\263\020\264\010\264\010\325\020\365\040\325\030\026\000\027\000\027"
  "\000\027\000\027\000\267\000\367\040\367\040w\000\030\000\030\000\031\000\030\000W\000\367\040\027!\327"
  "\020\267\010\267\010\326\020\027\000\027\000u\000\262z\015\304\006\365`\375\200\375\346"
  "\354\022)r\000\261\020\220\010\220\010\217\010\217\000\216\000n\000m\000m\000l\000l\000k\000k\000"
  "j\000I\000H\000H\000G\000F\000%\000$\000$\000G\000H\000I\000J\000k\000k\000l\000l\000m\000\255\030\016\000\255I\""
  "\365@\375A\375@\375`\375`\375!\375\250\344n\243T\000\325\030\025!\066\000\027\000\027"
  "\000\325Q\363\212\320\263M\314\253\334\312\354\351\354\351\354\312\344\214"
  "\334.\314\261\263\324\202\227A\030\000\030\000\230\000\027!\367\030w\000\224r\357\273"
  "\311\344@\375`\375`\375A\375A\375@\375Qj\023\000\322\030\221\010\221\010\220\010"
  "\217\010\217\010n\000n\000m\000m\000l\000l\000k\000k\000j\000I\000H\000G\000G\000F\000%\000$\000H\000I\000J\000j"
  "\000k\000l\000l\000m\000m\000\216\020N\000N\000\305\354`\375@\375@\375A\375C\375\200\375!"
  "\375p\243\225\000\066\000\027\000\225Aq\243\214\334$\365`\375\200\375`\375`\375`"
  "\375`\375`\375`\375`\375\200\375`\375`\375\006\365m\324\063\223\067)\031\000\330"
  "\010X\000r\243`\375\200\375C\375B\375@\375@\375`\375\005\365\223A\064\000\263\020"
  "\222\010\221\010\221\010\220\010\217\010\217\010n\000n\000m\000m\000l\000l\000k\000k\000j\000I\000"
  "H\000G\000F\000E\000%\000H\000I\000j\000k\000l\000l\000m\000m\000n\000\216\010\317\030\020\000h\324`\375A"
  "\375A\375@\375`\375L\314T\061\026\000\027\000\325Q\017\304\005\365`\375`\375`\375B"
  "\375B\375B\375B\375B\375A\375A\375B\375B\375B\375C\375A\375`\375`\375`\375"
  "\347\354\261\263\067\061\031\000\031\000\366Y\214\334`\375B\375@\375A\375`\375\251"
  "\344\025\000\324\030\264\010\263\010\222\010\222\010\221\010\220\010\217\010\217\010"
  "\216\000n\000m\000m\000l\000l\000k\000j\000J\000I\000H\000G\000F\000%\000I\000j\000k\000k\000l\000m\000m\000m\000n\000"
  "o\000\357\040\021\000\313\273\200\375B\375`\375@\375o\243\025\000\026\000\366\030\320"
  "\263\"\375\200\375`\375B\375B\375A\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375A\375B\375B\375`\375\200\375\007\365S\233\030\000\031"
  "\000\030\000\360\273`\375@\375C\375`\375M\314\026\000\365\040\265\010\264\010\263\010"
  "\222\010\222\010\221\010\220\010\217\010\217\010\216\000n\000m\000m\000l\000l\000k\000j\000I\000"
  "H\000H\000G\000F\000J\000k\000k\000l\000m\000m\000m\000n\000\216\000\217\000\360\040\021\000.\233`\375`\375"
  "\040\375\321\202\026\000\026\000Tj\311\344\200\375@\375C\375A\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "A\375C\375`\375`\375m\324\267I\031\000\031\000r\243`\375B\375`\375\260\263\027\000"
  "\026!\265\010\265\010\264\010\263\010\262\010\222\010\221\010\220\010\217\010\217\010"
  "n\000m\000m\000m\000l\000k\000k\000j\000I\000H\000G\000F\000j\000k\000l\000l\000m\000m\000n\000\216\000\217\010\220"
  "\010\320\030\022\000Pr`\375\"\375rr\026\000\026\000Q\233@\375`\375C\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375A\375C\375`\375\005\365\265\202\031\000\031\000\063\233@"
  "\375`\375\364\212\030\000\366\040\266\010\265\010\265\010\264\010\263\010\222\010\222"
  "\010\221\010\220\010\217\010\217\000n\000m\000m\000l\000l\000k\000j\000J\000I\000H\000G\000k\000k\000l\000"
  "m\000m\000n\000\216\000\217\010\220\010\220\010\261\020\022\000\222I\345\354\322\202\026"
  "\000\026\000\260\263`\375@\375B\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375C\375`\375@\375\063\233\031\000\031\000r\243`\375\066b\030\000\367\030\267"
  "\010\266\010\265\010\265\010\264\010\263\010\222\010\221\010\221\010\220\010\217\010"
  "\216\000n\000m\000m\000l\000l\000k\000j\000I\000H\000G\000k\000l\000l\000m\000m\000n\000\217\000\217\010\220\010"
  "\221\010\262\010\223\000\363\040\323Q\025\000\026\000\317\263`\375A\375A\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375B\375@\375`\375S\233"
  "\031\000\070\000\023\223\227Ax\000\330\020\327\010\267\010\266\010\265\010\265\010\264\010"
  "\263\010\222\010\221\010\220\010\220\010\217\010\216\000n\000m\000m\000l\000k\000k\000J\000I\000"
  "H\000l\000l\000m\000m\000n\000\216\000\217\010\220\010\221\010\222\010\223\010\263\010\224\000"
  "\225\000\026\000\260\253`\375B\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375B\375@\375`\375\364\212\031\000\030\000\230"
  "\000\330\020\330\010\330\010\327\010\267\010\266\010\265\010\264\010\264\010\263\010"
  "\222\010\221\010\220\010\217\010\217\010n\000m\000m\000l\000l\000k\000j\000I\000H\000l\000m\000m\000n"
  "\000\216\000\217\010\220\010\221\010\221\010\222\010\263\010\264\000\365\040\026\000\362"
  "\212`\375A\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375B\375`\375\"\375\026Z\030\000\030!\330\010\330\010"
  "\330\010\330\010\327\010\267\010\266\010\265\010\264\010\263\010\263\010\222\010\221"
  "\010\220\010\217\010\216\000n\000m\000m\000l\000k\000k\000J\000I\000l\000m\000m\000n\000\217\000\217\010"
  "\220\010\221\010\222\010\263\010\264\010\325\030\026\000\265I$\365`\375A\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375C\375`\375\252\344\030\000\330\020\330\020\330\010\330\010\330\010"
  "\330\010\327\010\266\010\266\010\265\010\264\010\263\010\222\010\221\010\220\010\217"
  "\010\217\010n\000m\000m\000l\000l\000k\000j\000I\000m\000m\000n\000\216\000\217\010\220\010\221\010\222"
  "\010\223\010\263\010\264\010\365\040\026\000l\324\200\375C\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375C\375`\375\261\263\031\000\030)\330\010\330\010\330\010\330\010\327\010"
  "\267\010\266\010\265\010\265\010\264\010\263\010\222\010\221\010\220\010\217\010\216"
  "\010n\000m\000m\000l\000k\000k\000J\000m\000m\000n\000\217\010\217\010\220\010\221\000\262\020\363\040"
  "\264\010\365\040\026\000\363\212`\375B\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375\"\375\366Q\030\000\370\030\330\010\330\020\330\010\330\010\327\010\267"
  "\010\266\010\265\010\264\010\263\010\222\010\221\010\220\010\220\010\217\010n\000m\000"
  "m\000l\000l\000k\000j\000m\000m\000\216\000o\000\220\010\321\030\361\040S\000\024\000\225\000\325\020"
  "\026\000\252\344`\375B\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375B\375`\375"
  "/\304\030\000\030)\270\000\270\000\030)\370\040\330\020\267\010\266\010\266\010\265\010"
  "\264\010\263\010\222\010\221\010\220\010\217\010\216\000n\000m\000m\000l\000k\000j\000m\000n\000"
  "\256\030\357\040\220\010\022\000\023\000\363\040\261\202T\071\027\000\363\212`\375A\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375!\375\026Z\030\000\030"
  ")\230\000\031\000\031\000\370\030\027!\367\030\266\010\265\010\264\010\263\010\222\010\221"
  "\010\220\010\217\010\217\010n\000m\000m\000l\000l\000k\000m\000\316\030\017\000\020\000\021\000or\354"
  "\273\004\365\310\344\225\000\027\000l\324`\375B\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375C\375`\375\320\273\031\000w\071l\324\360\273\066j\030\000\031"
  "\000\030\000\366\040\326\030\265\010\264\010\263\010\222\010\221\010\220\010\217\010\216"
  "\000n\000m\000l\000l\000k\000\216\020\017\000\316Y\253\253\247\344@\375`\375\200\375\257"
  "\253\027\000\025Z#\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375A\375`\375\351\354\027!\030\000m\324\240\375@\375\253\334\222\253\366Q\027"
  "\000\026\000\325\020\264\010\263\010\222\010\221\010\220\010\217\010\216\000n\000m\000m\000l"
  "\000k\000\016\000k\243@\375`\375`\375@\375B\375@\375sr\027\000r\243`\375B\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375A\375@\375\264\202"
  "\031\000\063\233`\375B\375`\375`\375\"\375M\324\325Q\026\000\325\030\264\010\263\010"
  "\222\010\221\010\220\010\217\000n\000m\000m\000l\000k\000\355(\"\365`\375A\375A\375A\375"
  "`\375\347\354\065\061\027\000M\314`\375B\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375C\375\200\375\321\263\031\000\066j@\375@\375B\375C\375"
  "@\375\200\375\213\334\026\000\325\030\264\010\263\010\222\010\221\010\220\010\217"
  "\010\216\000m\000m\000l\000l\000\016\000\207\334\200\375B\375@\375B\375`\375k\324\026\000"
  "\366\030\351\354`\375A\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375B\375`\375m\324\030\000\027!\350\354`\375A\375@\375$\375`\375\252\344"
  "\026\000\325\020\264\020\263\010\222\010\221\010\220\010\217\010\216\000n\000m\000m\000l\000"
  "\017\000nA\246\344\200\375B\375B\375`\375\356\273\027\000\025Z#\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375A\375`\375\350\354"
  "\027!\030\000\214\334`\375B\375C\375`\375\040\375\224z\027\000\365\030\265\010\264"
  "\010\222\010\221\010\220\010\217\010\217\000n\000m\000m\000l\000\316\030\020\000p\000i\324\200"
  "\375C\375`\375\220\253\030\000\264\202@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375A\375`\375$\365\326Q\031\000/\314`\375$\375"
  "`\375\347\354Vj\030\000\367\040\266\010\265\010\264\010\263\010\222\010\221\010\220"
  "\010\217\000n\000m\000m\000l\000o\000\317\030Q\000\022\000\354\273`\375`\375\062\233\030\000\023"
  "\223`\375A\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375ur\031\000\320\273`\375`\375\213\334w\071\031\000\027!\267\010"
  "\266\010\265\010\264\010\263\010\222\010\221\010\220\010\217\010n\000m\000m\000l\000\217"
  "\010\220\000\321\030\262\020\023\000O\233`\375\022\223\030\000R\233`\375B\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375B\375B\375B\375B\375C\375@\375\224"
  "z\031\000\361\273\240\375\017\304\030\000\070\000\030!\270\010\327\010\266\010\265\010\264"
  "\010\263\010\222\010\221\010\220\010\217\010\216\000m\000m\000l\000\217\010\220\010\221\000"
  "\262\020\363\040\025\000\322\202Tj\030\000s\243`\375B\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375A\375B\375@\375`\375`\375\200\375`\375\200\375\200\375\264z\031"
  "\000\222\253\360\273\031\000\330\010\370\040\330\010\330\010\327\010\266\010\265\010"
  "\264\010\263\010\222\010\221\010\220\010\217\010\216\000n\000m\000l\000\217\010\220\010\221"
  "\010\222\010\263\010\364\040\026\000\226\000\030\000\063\223`\375B\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375B\375`\375`\375$\375\253\334\017\304\261\263\222\253\261\263"
  ".\314Ub\230\000\367\020\030\000\370\020\370\030\330\010\330\010\330\010\327\010\266\010"
  "\265\010\264\010\263\010\222\010\221\010\220\010\217\010\216\000n\000m\000l\000\217\010\220"
  "\010\221\010\222\010\263\010\264\010\365\040\026)\030\000\364\212`\375A\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375A\375@\375`\375\350\354q\243\365\070\027\000w\000\267\001\327\001x\001\030\000"
  "\027\000\030\000\270\000\070!\330\020\330\010\330\010\330\010\330\010\327\010\266\010\266"
  "\010\265\010\264\010\222\010\221\010\220\010\217\010\216\000n\000m\000m\000\217\010\220\010"
  "\221\010\222\010\263\010\264\010\265\010\366\040\030\000ur@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "B\375`\375@\375\260\263\026\000\027\001\326s\366\234v\255\226\265\225\265\226\265"
  "V\255\266\224Wk\267\010\030\000\030\031\330\010\330\010\330\010\330\010\327\010\267"
  "\010\266\010\265\010\264\010\222\010\221\010\220\010\217\010\216\000n\000m\000m\000\217\010"
  "\220\010\221\010\222\010\263\010\264\010\265\010\326\030\027\000\266I%\365@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375B\375`\375$\365tr\027\000\366{u\265\326\275\266\275\266\265\266\265\266"
  "\265\266\265\266\265\326\275\266\265\066\245\027c\030\000\370\020\370\020\330\010"
  "\330\010\327\010\267\010\266\010\265\010\264\010\262\010\221\010\220\010\217\010\216"
  "\000n\000m\000m\000\217\010\220\010\221\010\222\010\263\010\264\010\265\010\326\020\327\020"
  "\030\000\312\344`\375A\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375A\375`\375#\375\364a\267\000\365\244\326\275\266\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\266\265\266\265\026\204\030\000\330\010\330\020\330\010\327\010\267\010\266\010\265"
  "\010\264\010\262\010\221\010\220\010\217\010\216\000n\000m\000m\000\217\010\220\010\221\010"
  "\222\010\263\010\264\010\265\010\266\010\027)\030\000/\314`\375B\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375`\375\323"
  "\202w\000\065\255\326\275\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\326\275V\214\030\000\370"
  "\020\330\010\327\010\267\010\266\010\265\010\264\010\262\010\221\010\220\010\217\010"
  "\216\010n\000m\000m\000\217\010\220\010\221\010\222\010\263\010\264\010\265\010\326\020"
  "\027)\030\000\064\223`\375B\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@"
  "\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375C\375`\375\016\304\027\000\325\234\326\275\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\326\275\327{\030\000\030\031\327\010\326\010"
  "\266\010\265\010\263\010\222\010\221\010\220\010\217\010\216\000n\000m\000m\000\217\010\220"
  "\010\221\010\222\010\263\010\264\010\325\020\226\000W\000\070\000wA\006\365`\375A\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375A\375C\375`\375\"\375\325"
  "(\366{\366\305\266\265\266\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\266"
  "\265\226\265WB\030\000\327\020\366\020\025\031\324\020\263\010\222\010\221\010\220\010"
  "\217\010\216\000n\000m\000l\000\217\010\220\010\221\010\222\010\263\010\264\020U\000u\071."
  "\304w\071\031\000/\314`\375B\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375B\375`\375`\375$\365\221\243\027\000\025c\326{v\214\066\245\266\265\266\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\326\275v\214\030\000\067\031\026\000\025\000\024\000\363"
  "\030\262\010\221\010\220\010\217\010\216\000n\000m\000l\000\217\000\220\010\221\010\222\010"
  "\223\010\364\040\026\000\260\253\200\375\324\202\031\000\225z@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375B\375`\375\006\365Q\233\025\000\026\000vJ\226"
  "J\366\061\026\000\026\000\026[\066\245\266\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\266\265v\255"
  "\027\031\226s\025\245\025\204TJ\023\000r\000\321\020p\000\217\010\216\000m\000m\000l\000\217\000"
  "\217\010\220\010\222\010\322\030\024\000\323Q$\365\200\375m\324\030\000\030\000m\324`"
  "\375C\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375B\375`\375\253\334u\040\227\000"
  "\066\204\066\255\226\265\266\265\266\265V\255v\214\066\031VB\266\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\326\275\027[\366Z\326\275\326\275\226\265T\214\222"
  "\000\021\000\320\020o\000\216\000m\000m\000l\000\216\000\217\010\220\010\221\010\362\040\024\000,"
  "\314\200\375B\375@\375ur\031\000ur@\375@\375@\375@\375@\375@\375@\375@\375@"
  "\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "B\375`\375\252\344\026\000\326Ju\255\326\275\266\265\266\265\226\265\226\265"
  "\266\265\326\275v\255\066\245\266\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\326"
  "\275\366{\366\020\226\265\226\265\226\265\326\275\365\234\021\031\020\000\257\020"
  "n\000m\000m\000l\000\216\000\217\010\220\000\321\040\023\000qr@\375@\375B\375`\375m\324\030"
  "\000\031\000\020\304\200\375C\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375`\375#\375uA\226B"
  "\265\265\266\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\266\265\266\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\266\265V\255\326"
  "\234\266\265\226\265\226\265\226\265\326\275\264\224\017\000\257\020\216\010m"
  "\000m\000l\000n\000\217\010\220\010\261\020\022\000\211\334`\375A\375@\375B\375`\375\024"
  "\213\031\000\067\061\311\354`\375C\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375B\375`\375\320\263\027\000"
  "U\255\266\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\266"
  "\265\266\265\226\265\226\265\226\265\226\265\226\265\326\275qk\016\000\316\020"
  "m\000m\000l\000n\000\217\000\317\040\021\000\317\202`\375B\375A\375A\375B\375`\375\350"
  "\354W\061\031\000Uj\040\375`\375B\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375B\375UI\266k\326\275\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\326\275\364\234\016\000\215\010"
  "\215\010l\000l\000n\000n\000\317\040\021\000\356\212\200\375`\375`\375`\375`\375`\375"
  "\200\375m\324\230\000\031\000\364\212@\375@\375A\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375A\375`\375\252\344\027\000"
  "\366\234\326\275\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265/B\015\000\255\020l\000k\000m\000\216\000\217\010\220\010\061\000\314\263\307\354"
  "\350\354\350\354\351\354\351\354\352\354\007\365\364\212\030\000\031\000\063\223@"
  "\375@\375B\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375B\375`\375M\314\027\000V\255\266\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\326\275\326\275\020c\015\000\315\020l\000k\000m\000n\000\217\000\217\010"
  "q\000\022\000\022\000\263\010\224\000\225\000\266\000\267\000\270\000\030!\270\000\070)\031\000\024"
  "\213@\375`\375C\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375B\375\200\375\016\304\027\001v\265\266\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\266\265\226\265S\214oJ\015\000\014\000\214\010\214\010K\000m\000n\000\216\010\217"
  "\000\220\010\361\040\262\010\223\000\224\000\225\000\226\000\267\000\227\000\270\000\330\020"
  "\330\010\070)\031\000ur\347\354\200\375B\375B\375@\375@\375@\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375B\375`\375m\324\027\000V\255\266\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\266\265\226\265\361Z\015\000\020c\362{Pk\014\000\013\000\213\010m\000m\000n\000\217"
  "\010\220\010\221\000\261\010\262\020\263\020\264\020\325\020\326\020\327\020\327\020"
  "\330\010\330\010\330\010\070)\030\000W\061N\314`\375`\375C\375B\375@\375@\375@\375"
  "@\375@\375@\375@\375@\375@\375A\375`\375\311\344\027\000\326\234\326\275\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\326\275\023\204\016\000\324\234\326\275\326\275\326\275"
  "\323\234k\000\012\000m\000m\000n\000\216\000\217\010\220\010\221\010\222\010\263\010\264\010"
  "\265\010\266\010\266\010\327\010\330\010\330\010\330\010\270\000\030!x\000\030\000\023\223"
  "\311\354`\375`\375A\375C\375B\375@\375@\375@\375@\375@\375@\375@\375@\375"
  "@\375\265Ywc\326\275\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\266\265\065\245\364\234\326\275"
  "\226\265\226\265\226\265\327\275\361{\010\000l\000m\000m\000n\000\217\010\220\010\221"
  "\010\221\010\222\010\263\010\264\010\265\010\266\010\267\010\327\010\330\010\330\010"
  "\330\010\330\010\330\020\030\000\031\000\027\031S\233\253\344@\375\200\375`\375@\375"
  "A\375B\375B\375B\375B\375B\375D\375`\375\360\273\030\000\065\255\266\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\266\265\266\265\226\265\226\265\226\265\226\265\266"
  "\265\263\224\010\000l\000m\000m\000n\000\216\000\217\010\220\010\221\010\222\010\263\010\264"
  "\010\265\010\265\010\266\010\267\010\327\010\330\010\370\030\070\000\267I\320\263\366"
  "Q\031\000\031\000X\000\265z\360\273\312\344\"\375`\375`\375`\375`\375`\375`\375`"
  "\375\200\375`\375\025j\227B\226\265\266\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265"
  "\226\265\226\265\226\265\226\265\326\275\222\224\007\000l\000l\000m\000m\000n\000\217\010"
  "\220\010\220\010\221\010\222\010\263\010\264\010\265\010\266\010\266\010\327\010\327"
  "\010\330\020\230\000\030!\005\365\"\375\321\263\026Z\030\000\031\000\031\000\230\000\066b\023"
  "\223\261\253\017\304N\314m\324m\324N\314\360\273\221\253Uj\030\000\026cv\255\326"
  "\275\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\226"
  "\265\226\265\226\265\226\265\226\265\226\265\226\265\226\265\266\265\016c"
  "\007\000k\000l\000m\000m\000n\000\216\000\217\010\220\010\221\010\221\010\222\010\263\010\264\010"
  "\265\010\266\010\266\010\327\010\327\010\370\030\030\000m\324\200\375`\375\"\375M"
  "\324\063\223\326Q\030\000\031\000\031\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030"
  "\000\067!\030\000\067B\266\224\226\265\326\275\326\275\326\275\326\275\326\275\326"
  "\275\326\275\326\275\326\275\326\275\326\275\326\275\326\275\326\275\326"
  "\275\326\275\326\275\326\275\326\275\326\275\326\275\326\275\326\275\326"
  "\275\326\275\326\275\326\275\326\275\326\275\326\275\326\275\326\275\266"
  "\265\021\204\010\000\250\020k\000l\000l\000m\000m\000n\000\217\000\217\010\220\010\221\010\222"
  "\010\263\010\263\010\264\010\265\010\266\010\266\010\267\010\027!\031\000\360\273`\375"
  "$\375`\375`\375`\375\005\365\214\334\017\304\066b\270\000\067)\030!\030!\027!\027!\027"
  ")\027)\367\030\330\000\070\031\030\000\030\000wJ\326{V\214V\214V\214v\214v\214v\214W"
  "\214W\214v\214v\214v\214\226\224\226\224\226\224\226\224\225\224u\214u\214"
  "u\214t\214t\214T\214T\214S\214s\214s\214S\214S\214S\214s\214\062\204\316Z"
  "\010\000i\000h\000k\000k\000l\000m\000m\000n\000\216\000\217\010\217\010\220\010\221\010\222\010\263"
  "\010\263\010\264\010\265\010\266\010\266\010\027!\030\000S\233`\375B\375@\375B\375"
  "C\375@\375\240\375\252\344\227Ax\000\370\020\330\010\330\010\330\010\330\010\330"
  "\010\330\010\330\010\330\010\330\010\030\021\030\021\030\000\030\000\030\000\027:\027Bw!\030\000"
  "\070!\027B\027BX\000\030\000\030\000\030\000\030\000\027\000\026\000\026\000\024\000\024\000\023\000\022\000\021"
  "\000\261\061\020:\360\071\016\000\015\000\356\071\016:\215\061\012\000\011\000\011\000\251\020h\000"
  "G\000j\000k\000l\000l\000m\000m\000n\000n\000\217\010\220\010\220\010\221\010\222\010\263\010\264"
  "\010\264\010\265\010\266\010\366\040\027\000\224z@\375@\375@\375A\375@\375`\375\017"
  "\304\030\000\030\000\370\030\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330"
  "\010\330\010\330\010\330\010\330\010\070!\030\000V\214\326\275\266\265\267s\030\000\026"
  "\245\326\275\226\265wJ\270\020\030\000\222\254\256\325n\315\255\325\357\274\064"
  "\000\023\031\062!\021\000QBv\255\326\275\025\245\015\000\221s\266\265\326\275R\214\012"
  "\000+!\312\020I\000H\000G\000J\000j\000k\000l\000l\000m\000m\000n\000\216\000\217\010\220\010\220\010\221"
  "\010\222\010\263\010\264\010\264\010\265\010\325\030\026\000\265I$\365@\375C\375`\375"
  "`\375\222\253\031\000\370\020\370\030\330\010\330\010\330\010\330\010\330\010\330\010"
  "\330\010\330\010\330\010\330\010\330\010\330\010\370\020\230\000\070\031V\245\326\275"
  "v\255\030\031\227R\226\265\326\275\326\234\027\000\027\000uR\302\376\040\377\000\377"
  "\040\377\060\234\023\000\022!\362\030\020\000\363{\266\265\326\275\362{\014\000\364\234"
  "\326\275\226\265\256R\012\000\252\020I\000H\000G\000F\000I\000j\000k\000k\000l\000m\000m\000m\000n\000"
  "\216\000\217\010\220\010\220\010\221\010\222\010\263\010\263\010\264\010\265\020\325"
  "\020\026\000\252\344\200\375`\375!\375\364\212\031\000\030!\330\020\330\010\330\010"
  "\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330"
  "\010\030\031\030\000\067c\266\265\266\265\226\224\030\000V\214\266\265\266\265vk\027"
  "\000\027\000/\275\000\377\246\376\000\377-\275\024\000\362\030\261\010\261\010\020\000\025\245"
  "\326\275\226\265\316\061\016:\226\265\326\275\024\235\012\000\212\010i\000H\000G\000F"
  "\000F\000H\000I\000j\000k\000k\000l\000m\000m\000m\000n\000\216\000\217\010\220\010\220\010\221\010\222"
  "\010\263\010\263\010\264\010\324\030\026\000sr\252\344l\324\065b\030\000\027)\330\020\330"
  "\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010"
  "\330\010\330\010\330\010\030\031\030\000\226\224\326\275\266\265\367Z\030\000V\255\326"
  "\275V\255\266\061\027\000\065J\245\366\343\376\002\377)\346\362\030\222\000q\000\261"
  "\010\020\000\261R\226\265\326\275\324\234\013\000\022|\326\275\266\265\321{\011\000"
  "\312\020I\000H\000G\000F\000%\000H\000I\000I\000j\000k\000l\000l\000m\000m\000m\000n\000\216\000\217\010\220"
  "\010\220\010\221\010\222\010\222\010\263\010\264\000\324\030\025\000\026\000\026\000\027\000\026"
  "!\267\010\327\010\327\010\330\010\330\010\330\010\330\010\330\010\330\010\330\010\330"
  "\010\330\010\330\010\330\010\330\010\370\020\030\000\367\071v\255\326\275\066\245\027"
  "\000\066c\266\265\326\275v\214\026\000\026\000\357\264\000\377\305\376\343\376\207\366"
  "I\356g\356G\356OR\017\000S\214\326\275\266\265qk\014\000\065\245\326\275u\255\354"
  "\071\011\000\211\010H\000G\000F\000%\000%\000G\000H\000I\000J\000j\000k\000l\000l\000m\000m\000m\000n\000\216\000"
  "\217\010\220\010\220\010\221\010\221\010\222\010\263\010\223\000\324\030\324\030\365"
  "\030\365\030\266\010\266\010\266\010\267\010\327\010\327\010\327\010\327\010\330\010"
  "\330\010\330\010\330\010\330\010\330\010\330\010\330\010\030\031\030\000\266s\266\265"
  "\266\265\066\204\027\000\266\224\326\275\266\265\025c\025\000\064J\206\366\002\377\344"
  "\376\344\376\342\376\001\377\040\377J\305\017\000O)U\255\326\275U\255m\000\317R\266"
  "\265\326\275\263\224\010\000\311\020H\000G\000F\000F\000%\000$\000F\000G\000H\000I\000J\000j\000k\000l"
  "\000l\000m\000m\000m\000n\000\216\000\217\010\217\010\220\010\221\010\221\010\222\010\222\010"
  "\263\010\263\010\264\010\264\010\265\010\265\010\266\010\266\010\266\010\266\010\267"
  "\010\267\010\267\010\327\010\327\010\327\010\327\010\327\010\327\010\327\010\367\020"
  "\027\000\366\234\326\275\226\265VB\226)v\255\326\275\065\245\064!\025\000\060\234"
  "\340\376\304\376\304\376\344\376\304\376\001\377J\305\020\000\016\000Qk\266\265\326"
  "\275s\214\012\000r\214\326\275\266\265Ok\010\000\311\020G\000G\000F\000%\000$\000#\000F\000G\000"
  "G\000H\000I\000J\000j\000k\000l\000l\000m\000m\000m\000n\000\216\000\217\010\217\010\220\010\220\010\221"
  "\010\221\010\222\010\222\010\263\010\263\010\264\010\264\010\265\010\265\010\265\010"
  "\265\010\266\010\266\010\266\010\266\010\266\010\266\010\266\010\266\010\266\010\366"
  "\020\026\000vJ\226\265\266\265\365\234\025\000\265s\266\265\326\275\025\204\023\000"
  "\323\020r)\320b\060J\252\325\342\376\001\377\251\325\017\000\317\020\015\000\263\224"
  "\326\275\266\265\317Z\014\000U\255\266\265U\255*!\010\000h\010G\000F\000%\000$\000$\000#\000"
  "%\000F\000G\000G\000H\000I\000J\000j\000k\000l\000l\000m\000m\000m\000n\000n\000\216\000\217\010\217\010\220"
  "\010\221\010\221\010\221\010\222\010\222\010\263\010\263\010\264\010\264\010\264\010"
  "\265\010\265\010\265\010\265\010\265\010\265\010\265\010\265\010\265\010\265\010\025"
  "\031\025\000\365{\326\275\326\275\325s\024\000\365\234\326\275\226\265\223J\022\000"
  "\362\020\262\020\022\000\257b\244\376\040\377\350\335\017\000.\000-\000\356\071u\255\326"
  "\275\065\245\013\000/c\266\265\327\275r\214\006\000\310\030'\000F\000%\000%\000$\000#\000#\000$"
  "\000%\000F\000G\000H\000H\000I\000J\000j\000k\000l\000l\000m\000m\000m\000n\000n\000\216\000\217\010\217\010\220"
  "\010\220\010\221\010\221\010\221\010\222\010\222\010\263\010\263\010\263\010\263\010"
  "\264\010\264\010\264\010\264\010\264\010\264\010\264\010\264\010\264\010\364\030\024"
  "\000\024c\266\265\065\245\023\031SJ\226\265\326\275\365\234\022\000\262\020\261\010"
  "\021!\020\000\310\335@\377\007\346\356\030\016\000.!\014\000\261s\266\265\326\275\022\204"
  "\011\000MJu\255v\255lJ\007\000\247\020F\000%\000%\000$\000#\000#\000\"\000$\000%\000%\000F\000G\000H\000H\000"
  "I\000j\000j\000k\000k\000l\000l\000m\000m\000m\000n\000n\000\216\000\217\010\217\010\220\010\220\010\220"
  "\010\221\010\221\010\222\010\222\010\222\010\222\010\263\010\263\010\263\010\263\010"
  "\263\010\263\010\263\010\263\010\263\010\263\010\263\010\023\000\063B\323\071\022\000\024"
  "\204\326\275\266\265\263s\021\000\361\020\020!\020\000\355\223\040\377F\356\256\071"
  "\016\000\015!\215\010\014\000\364\234\326\275\226\265mJ\012\000\011\000\313\071\353\071\007"
  "\000\207\010&\000E\000%\000$\000#\000#\000\"\000\"\000#\000$\000%\000%\000F\000G\000H\000H\000I\000J\000j\000k\000k"
  "\000l\000l\000m\000m\000m\000m\000n\000n\000\216\000\217\010\217\010\220\010\220\010\220\010\220\010"
  "\221\010\221\010\221\010\222\010\222\010\222\010\222\010\222\010\222\010\222\010\222"
  "\010\222\010\222\010\222\010\322\020\022\000\022\000\361\020\065\245\266\265v\255\361"
  "\071\020\000\360\030\017\000.)\205\366\205\366\355A\016\000\015!\255\010\014\000\216J\226"
  "\265\266\265\364\234\012\000\212\010\211\010\010\000\007\000\207\010&\000E\000%\000$\000#\000#\000"
  "\"\000\"\000\"\000#\000#\000$\000%\000%\000F\000G\000G\000H\000I\000I\000j\000k\000k\000l\000l\000l\000m\000m\000m\000"
  "m\000n\000n\000\216\000\217\010\217\010\217\010\220\010\220\010\220\010\220\010\220\010\221"
  "\010\221\010\221\010\221\010\221\010\221\010\221\010\221\010\221\010\221\010\221\010"
  "\021\031\020\000\362Z\266\265\326\275\264\224\017\000\317\020\017!\017\000\312\264\303"
  "\376MR\016\000\015!M\000\355\030\013\000\062\204\326\275\326\275\260s\010\000\311\020H\000"
  "\210\010\207\010F\000E\000%\000$\000$\000#\000\"\000\"\000\"\000\"\000\"\000#\000#\000$\000%\000%\000F\000G\000"
  "G\000H\000I\000I\000j\000j\000k\000k\000l\000l\000l\000m\000m\000m\000m\000n\000n\000n\000\216\000\217\000\217\010"
  "\217\010\217\010\217\010\220\010\220\010\220\010\220\010\220\010\220\010\220\010\220"
  "\010\220\010\220\010\220\010\320\020\017\000PBu\255\226\265\320Z\016\000\316\020\256"
  "\020\016\000\314b\214Z\015\000\015!M\000l\000\314\020\013\000pk\266\265\065\245j)\010\000\210"
  "\010G\000G\000F\000E\000%\000$\000$\000#\000#\000\"\000\"\000\"\000\"\000\"\000\"\000#\000#\000$\000$\000%\000F\000"
  "F\000G\000H\000H\000I\000J\000j\000k\000k\000k\000l\000l\000l\000m\000m\000m\000m\000m\000n\000n\000n\000\216\000\216"
  "\000\217\000\217\010\217\010\217\010\217\010\217\010\217\010\217\010\217\010\217\010\217"
  "\010\217\010\217\000\257\010\016\000\357\071OB\016\000\256\010n\000m\000\255\020\015\000\015\000"
  "\354\040L\000l\000l\000k\000k\000\012\000mJ\253\061\010\000\210\010G\000G\000F\000%\000%\000$\000#\000#\000"
  "#\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000#\000#\000$\000$\000%\000F\000F\000G\000G\000H\000I\000I\000J"
  "\000j\000k\000k\000k\000l\000l\000l\000m\000m\000m\000m\000m\000m\000n\000n\000n\000n\000\216\000n\000\216\000\216"
  "\000\216\000\216\000\216\000\216\000\216\000n\000\216\000n\000\256\020\015\000\015\000\255\020m\000m"
  "\000m\000m\000\314\020\314\030L\000l\000k\000k\000j\000j\000\211\010\010\000\010\000\210\010'\000F\000F\000"
  "%\000$\000$\000#\000#\000\"\000\"\000\"\000\"\000\"\000\"\000\"\000",
};


Display::Display ()
    : myTFT(DISPLAY_MOSI_PIN, DISPLAY_MISO_PIN, DISPLAY_SCLK_PIN, DISPLAY_CS_PIN, DISPLAY_RST_PIN, DISPLAY_DC_PIN, "TFT")
{
    //myTFT = new SPI_TFT_ILI9341(DISPLAY_MOSI_PIN, DISPLAY_MISO_PIN, DISPLAY_SCLK_PIN, DISPLAY_CS_PIN, DISPLAY_RST_PIN, DISPLAY_DC_PIN,"TFT");
    //myTFT.claim(stdout);        // send stdout to the TFT display
    myTFT.set_orientation(1);
    myTFT.background(Black);    // set background to black
    myTFT.foreground(White);    // set chars to white
    myTFT.cls();                // clear the screen
    myTFT.set_font((unsigned char*) Arial12x12);
    myTFT.locate(0,0);
    //LOG("O HOH O\r\n");
    //myTFT.printf("O HOH O ");
}

void Display::drawClock(TimeClass *time, bool face, TimeClass *prevTime)
{
    //LOG("Small\r\n");
    /*myTFT.circle(70, 70, 60, 0xFFFFFF);                 // clock circle
    myTFT.line(70, 10, 70, 20, 0xFFFFFF);               // 12 oclock
    myTFT.line(70, 130, 70, 120, 0xFFFFFF);             // 6 oclock
    myTFT.line(10, 70, 20 , 70, 0xFFFFFF);              // 3 oclock
    myTFT.line(120, 70, 130 , 70, 0xFFFFFF);            // 9 oclock
    myTFT.line(100, 121.9615, 95, 113.301, 0xFFFFFF);   // 7 oclock
    myTFT.line(40, 18.0385, 45, 26.699, 0xFFFFFF);      // 1 oclock
    myTFT.line(121.9615, 100, 113.301, 95, 0xFFFFFF);   // 8 oclock
    myTFT.line(18.0385, 40, 26.699, 45, 0xFFFFFF);      // 2 oclock
    myTFT.line(121.9615,40,113.301,45, 0xFFFFFF);       // 4 oclock
    myTFT.line(18.0385,100,26.699,95, 0xFFFFFF);        // 10 oclock
    myTFT.line(100,18.0385,95,26.699, 0xFFFFFF);        // 5 oclock
    myTFT.line(40,121.9615,45,113.301, 0xFFFFFF);       // 11 olcock
    //LOG("SO Near: %x\r\n", (void *)time);
    float h = time->hour % 12;
    float m = time->minute;
    float s = time->second;
    float htheta = (M_PI/6.0)*(h + (m/60.0) + (s/3600.0));            // hour hand angle
    float mtheta = (M_PI/6.0)*(m + (s/60.0))/5.0;            // minute hand angle
    float stheta = (M_PI/6.0)*s/5.0;                       // second hand angle
    float hx = 70.0 + 15.0*sin(htheta);                     // hour hand position
    float hy = 70.0 - 15.0*cos(htheta);                     //
    float mx = 70.0 + 30.0*sin(mtheta);                     // minute hand position
    float my = 70.0 - 30.0*cos(mtheta);                     //
    float sx = 70.0 + 50.0*sin(stheta);                     // second hand position
    float sy = 70.0 - 50.0*cos(stheta);                     //
    //LOG("SO Far: %f, %f\r\n", sx, sy);
    if (cls) {
        myTFT.line(70, 70, hx, hy, Black);   // hour hand plot
        myTFT.line(70, 70, mx, my, Black);   // minute hand plot
        myTFT.line(70, 70, sx, sy, Black);   // second hand plot
    } else {
        myTFT.line(70, 70, hx, hy, Yellow);   // hour hand plot
        myTFT.line(70, 70, mx, my, White);   // minute hand plot
        myTFT.line(70, 70, sx, sy, DarkCyan);   // second hand plot
    }*/
    int xc = 80;
    int yc = 90;
    int r = 80;
    if (face) {
        myTFT.circle(xc, yc, r, White);                 // clock circle
        for (int i = 0; i < 12; i++)
            myTFT.line(xc+6*r/7*sin((float)i*M_PI/6.0), yc-6*r/7*cos((float)i*M_PI/6.0), 
            xc + r*sin((float)i*M_PI/6.0), yc-r*cos((float)i*M_PI/6.0), 0xFFFFFF);
    }
    
    //LOG("SO Near: %x\r\n", (void *)time);
    float h = time->hour % 12;
    float m = time->minute;
    float s = time->second;
    float htheta = (M_PI/6.0)*(h + (m/60.0) + (s/3600.0));            // hour hand angle
    float mtheta = (M_PI/6.0)*(m + (s/60.0))/5.0;            // minute hand angle
    float stheta = (M_PI/6.0)*s/5.0;                       // second hand angle
    int hx = xc + r*sin(htheta)/4.5;                     // hour hand position
    int hy = yc - r*cos(htheta)/4.5;                     //
    int mx = xc + r*sin(mtheta)/1.9;                     // minute hand position
    int my = yc - r*cos(mtheta)/1.9;                     //
    int sx = xc + r*sin(stheta)/1.5;                     // second hand position
    int sy = yc - r*cos(stheta)/1.5;                     //
    
    float ps = prevTime->second;
    float pm = prevTime->minute;
    float ph = prevTime->hour % 12;
    float hp_the = (M_PI/6.0)*(ph + (pm/60.0) + (ps/3600.0));
    float mp_the = (M_PI/6.0)*(pm + (ps/60.0))/5.0;
    float sp_the = (M_PI/6.0)*ps/5.0;
    int hxp = xc + r*sin(hp_the)/4.0;
    int hyp = yc - r*cos(hp_the)/4.0;                     //
    int mxp = xc + r*sin(mp_the)/1.9;                     // minute hand position
    int myp = yc - r*cos(mp_the)/1.9;                     //
    int sxp = xc + r*sin(sp_the)/1.5;                     // second hand position
    int syp = yc - r*cos(sp_the)/1.5;
    
    if (syp != sy || sxp != sx || face) {
        myTFT.line(xc, yc, sxp, syp, Black);
    }
    
    if (myp != my || mxp != mx || face) {
        myTFT.line(xc, yc, mxp, myp, Black);
    }
    
    if (hyp != hy || hxp != hx || face) {
        myTFT.line(xc, yc, hxp, hyp, Black);
    }
    
    myTFT.line(xc, yc, hx, hy, Yellow);
    myTFT.line(xc, yc, mx, my, White);
    myTFT.line(xc, yc, sx, sy, Orange);
   
    
}

void Display::drawClockBig(TimeClass *time, bool face, TimeClass *prevTime)
{
    int xc = myTFT.width()/2;
    int yc = myTFT.height()/2;
    int r = (myTFT.height()*5)/12;
    if (face) {
        myTFT.circle(xc, yc, r, White);                 // clock circle
        for (int i = 0; i < 12; i++)
            myTFT.line(xc+6*r/7*sin((float)i*M_PI/6.0), yc-6*r/7*cos((float)i*M_PI/6.0), 
            xc + r*sin((float)i*M_PI/6.0), yc-r*cos((float)i*M_PI/6.0), 0xFFFFFF);
    }
    
    //LOG("SO Near: %x\r\n", (void *)time);
    float h = time->hour % 12;
    float m = time->minute;
    float s = time->second;
    float htheta = (M_PI/6.0)*(h + (m/60.0) + (s/3600.0));            // hour hand angle
    float mtheta = (M_PI/6.0)*(m + (s/60.0))/5.0;            // minute hand angle
    float stheta = (M_PI/6.0)*s/5.0;                       // second hand angle
    int hx = xc + r*sin(htheta)/4.5;                     // hour hand position
    int hy = yc - r*cos(htheta)/4.5;                     //
    int mx = xc + r*sin(mtheta)/1.9;                     // minute hand position
    int my = yc - r*cos(mtheta)/1.9;                     //
    int sx = xc + r*sin(stheta)/1.5;                     // second hand position
    int sy = yc - r*cos(stheta)/1.5;                     //
    
    float ps = prevTime->second;
    float pm = prevTime->minute;
    float ph = prevTime->hour % 12;
    float hp_the = (M_PI/6.0)*(ph + (pm/60.0) + (ps/3600.0));
    float mp_the = (M_PI/6.0)*(pm + (ps/60.0))/5.0;
    float sp_the = (M_PI/6.0)*ps/5.0;
    int hxp = xc + r*sin(hp_the)/4.5;
    int hyp = yc - r*cos(hp_the)/4.5;                     //
    int mxp = xc + r*sin(mp_the)/1.9;                     // minute hand position
    int myp = yc - r*cos(mp_the)/1.9;                     //
    int sxp = xc + r*sin(sp_the)/1.5;                     // second hand position
    int syp = yc - r*cos(sp_the)/1.5;
    
    if (syp != sy || sxp != sx || face) {
        myTFT.line(xc, yc, sxp, syp, Black);
    }
    
    if (myp != my || mxp != mx || face) {
        myTFT.line(xc, yc, mxp, myp, Black);
    }
    
    if (hyp != hy || hxp != hx || face) {
        myTFT.line(xc, yc, hxp, hyp, Black);
    }
    
    myTFT.line(xc, yc, hx, hy, Yellow);
    myTFT.line(xc, yc, mx, my, White);
    myTFT.line(xc, yc, sx, sy, Orange);
    
}

char *month_names[] = 
{
    "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", 
    "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."
};
char *dow_names[] = 
{
    "Sunday", "Monday", "Tuesday", "Wednesday",
    "Thursday", "Friday", "Saturday"
};

void Display::cls()
{
    myTFT.fillrect(0, 0, myTFT.width(), myTFT.height(), Black);
}

void Display::drawDate(DateClass *date)
{
    /*int d = date->day;
    int m = date->month;
    int y = date->year;*/
    //LOG("IN Date\r\n");
    //myTFT.set_font((unsigned char*)Arial28x28);
    myTFT.fillrect(0, 185, 100, myTFT.height(), Black);
    myTFT.foreground(Orange);
    myTFT.locate(20,190);
    text(20, 190, dow_names[date->dow]);
    //LOG("OUTDATE\r\n");
    //myTFT.set_font((unsigned char*)Arial12x12);
    char buf[15];
    sprintf(buf, "%d %s %d\n", date->day, month_names[(date->month)-1], date->year);
    myTFT.locate(20,210);
    text(20, 210, buf);
    myTFT.foreground(White);
}

void Display::drawImg(int x, int y, const unsigned char *img, int w, int h)
{
    for (int i = 0; i < w; i++)
        for (int j = 0; j < h; j++)
            myTFT.pixel(x+i, y+j, (int)((((int)img[2*(w*j+i)+1]) << 8) & 0xff00) | ((int)img[2*(w*j+i)]&0x00ff));
}

void Display::text(int x, int y, const char *str)
{
    while (*str != '\0')
        myTFT.character(x++, y, *(str++));
}

extern DigitalOut led1;
void Display::drawWeather(WeatherClass *data, bool draw_img)
{
    if (draw_img)
        drawImg(200, 10, weat_ico.pixel_data, weat_ico.width, weat_ico.height);
    //    if (data->type == sunny)
    //        drawImg(200, 10, sunny_pic.pixel_data, sunny_pic.width, sunny_pic.height);
    myTFT.set_font((unsigned char*)Arial12x12);
    myTFT.foreground(Yellow);
    myTFT.locate(210, 95);
    myTFT.fillrect(200, 90, 200+100, 140, Black);
    text(210, 95, data->place);
    myTFT.set_font((unsigned char*)Arial28x28);
    myTFT.locate(200, 115);
    char buf[30];
    sprintf(buf, "%d %c\n", data->temp, data->isCelsius ? 'C' : 'F');
    text(200, 115, buf);
    myTFT.circle(244, 119, 3, Yellow);
    myTFT.foreground(White);
    myTFT.set_font((unsigned char*)Arial12x12);
    
}

void Display::drawAlarm(TimeClass *alarmTime)
{
    myTFT.fillrect(160, 165, myTFT.width(), myTFT.height(), Black);
    if (alarmTime->second < 0)
        myTFT.foreground(Green);
    else
        myTFT.foreground(Red);
    myTFT.set_font((unsigned char*)Arial24x23);
    myTFT.locate(160,200);
    //LOG("OUTDATE\r\n");
    char buf[15];
    sprintf(buf, "%02d:%02d %s\n", alarmTime->hour == 12 ? 12 : alarmTime->hour%12, alarmTime->minute, alarmTime->hour>=12 ? "p.m." : "a.m.");
    text(160, 200, buf);
    myTFT.set_font((unsigned char*)Arial12x12);
    myTFT.foreground(White);
}

void Display::flashAlarmSet(TimeClass *alarmTime, int set_alarm_state)
{
    if (alarmTime->second < 0)
        myTFT.foreground(Green);
    else
        myTFT.foreground(Red);
    myTFT.set_font((unsigned char*)Arial24x23);
    if (set_alarm_state == 1)
        myTFT.fillrect(155, 195, 175, myTFT.height(), Black);
    else if (set_alarm_state == 2)
         myTFT.fillrect(175, 195, 195, myTFT.height(), Black);
    else if (set_alarm_state == 3)
        myTFT.fillrect(195, 195, 230, myTFT.height(), Black);
    wait(1);
    char buf[15];
    sprintf(buf, "%02d:%02d %s\n", alarmTime->hour == 12 ? 12 : alarmTime->hour%12, alarmTime->minute, alarmTime->hour>=12 ? "p.m." : "a.m.");
    myTFT.locate(160,200);
    text(160, 200, buf);
    myTFT.set_font((unsigned char*)Arial12x12);
    myTFT.foreground(White);
}

void Display::drawAll(StateClass *state, bool doCls)
{
    if (doCls)
        cls();
    if (!(state->screenActive))
        return;
    if (state->screenState == 0) {
        drawClock(state->time, true, state->prevTime);
        drawDate(state->date);
        drawWeather(state->weather, true);
        if (state->alarm)
            drawAlarm(state->alarm);
    } else if (state->screenState == 1) {
        drawClockBig(state->time, true, state->prevTime);
    }
}