97 #ifdef ADAFRUIT_TFT_TOUCHSHIELD_1947 115 #ifdef ADAFRUIT_TFT_TOUCHSHIELD_1947 119 Serial.println(
"No touchscreen present.");
123 #endif // ADAFRUIT_TFT_TOUCHSHIELD_1947 129 int16_t lcdWidth, lcdHeight;
187 #ifdef ADAFRUIT_TFT_TOUCHSHIELD_1947 191 #ifdef SEEEDSTUDIO_TFT_TOUCHSHIELD_V2
195 #ifdef ADAFRUIT_TFT_TOUCHSHIELD_1947 197 y = map(p.
x, 0, 240, 0, 240);
198 x = map(p.
y, 0, 320, 320, 0);
199 #endif // ADAFRUIT_TFT_TOUCHSHIELD_1947 201 #ifdef SEEEDSTUDIO_TFT_TOUCHSHIELD_V2 203 y = map(p.
x, 1700, 300, 0, 240);
204 x = map(p.
y, 1800, 200, 320, 0);
205 #endif // SEEEDSTUDIO_TFT_TOUCHSHIELD_V2 298 void EasySMU_IOpanel::OverwriteOldString(uint16_t fg_color, uint16_t bg_color,
char *old_string,
const char *new_string)
302 uint16_t new_x, new_y;
303 for (int8_t
i=0; (
i < 16) && (old_string[
i] !=
'\0') && (new_string[
i] !=
'\0');
i++)
310 lcd.print(old_string[
i]);
314 lcd.print(new_string[i]);
338 char str_old[16], str_new[16];
339 dtostrf(flt_old,8,4,str_old);
341 dtostrf(flt_new,8,4,str_new);
367 char str_old[16], str_new[16];
368 dtostrf(flt_old,8,4,str_old);
370 dtostrf(flt_new,8,4,str_new);
394 char str_old[16], str_new[16];
395 dtostrf(flt_old,3,1,str_old);
397 dtostrf(flt_new,3,1,str_new);
421 char str_old[16], str_new[16];
422 dtostrf(flt_old,3,1,str_old);
424 dtostrf(flt_new,3,1,str_new);
430 void EasySMU_IOpanel::AddLeadingSign(
char chrSign,
char *
string,int8_t strlen)
433 for (i=0; (i<strlen) && (
string[i+1]==
' '); i++);
458 char str_old[16], str_new[16];
459 dtostrf(flt_old*1000,7,3,str_old);
460 strcat(str_old,
"mA");
461 AddLeadingSign(
'+',str_old,16);
462 dtostrf(flt_new*1000,7,3,str_new);
463 strcat(str_new,
"mA");
466 AddLeadingSign(
'+',str_new,16);
470 AddLeadingSign(
'-',str_new,16);
493 char str_old[16], str_new[16];
494 dtostrf(flt_old*1000,7,3,str_old);
495 strcat(str_old,
"mA");
496 dtostrf(flt_new*1000,7,3,str_new);
497 strcat(str_new,
"mA");
void DisplayTemperatureOfVadc(int16_t channel, float flt_old, float flt_new)
Draw the measured temperature from the voltage ADC. Presently, not used as it clutters up the screen...
#define _VMINUSMINUS_LEFT
int SMUselected_
stores which SMU channel is selected on the TFT display
int16_t height(void) const
#define _IPLUSPLUS_BOTTOM
void setFont(const GFXfont *f=NULL)
void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
int16_t getCursorY(void) const
void setCursor(int16_t x, int16_t y)
void DisplayMeasuredVoltage(int16_t channel, float flt_old, float flt_new)
Draw the measured voltage for a single channel.
int16_t width(void) const
static uint8_t channel
LTC2305 Channel selection.
int CheckButton()
check if a button is pressed
uint32_t start_button_pressed_
keep track of when the button was pressed to later calculate the duration it has been held ...
int16_t getCursorX(void) const
void DisplayMeasuredCurrent(int16_t channel, float flt_old, float flt_new)
Draw the measured current for a single channel.
void DisplaySMULabel()
Draw the SMU labels. The selected channel will be green.
#define _IMINUSMINUS_LEFT
#define _BUTTON_TEXT_PLUSPLUS_LEFT
void DisplayVoltageSourceSetting(int16_t channel, float flt_old, float flt_new)
Draw the voltage source setting for a single channel.
#define _VMINUSMINUS_BOTTOM
void setTextColor(uint16_t c)
boolean begin(uint8_t thresh=FT6206_DEFAULT_THRESSHOLD)
Setups the HW.
void setRotation(uint8_t r)
void DisplayTemperatureOfIadc(int16_t channel, float flt_old, float flt_new)
Draw the measured temperature from the current ADC. Presently, not used as it clutters up the screen...
uint8_t enabled_
indicates if the TFT is enabled.
void Init()
Initialize the IO panel, including drawing buttons, etc.
uint32_t duration_button_pressed_
stores a value corresponding to how long the button has been pressed
void fillScreen(uint16_t color)
#define _IMINUSMINUS_BOTTOM
int button_pressed_
stores the value of the button pressed (from enum)
void DisplayCurrentSourceSetting(int16_t channel, float flt_old, float flt_new, int8_t source_both_sink)
Draw the current source setting for a single channel.
#define _VMINUSMINUS_RIGHT
#define _VPLUSPLUS_BOTTOM
#define _BUTTON_TEXT_LEFT
Header File for EasySMU_IOpanel Library That Enables Touchscreen Control of EasySMU.
#define _IMINUSMINUS_RIGHT