Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Display

Hierarchy

  • Display

Index

Methods

buildDisplayArray

  • buildDisplayArray(): void
  • Creates the temperatureArray and runs checkAndBuildChar a coulpe times until every character of the display is build

    Returns void

changeIndentation

  • changeIndentation(row: number): void
  • Change value indentation and add a space if it is row number 0 (means 1 beacouse the first row will be printed already)

    Parameters

    • row: number

    Returns void

checkAndBuildChar

  • checkAndBuildChar(tempArrChar: number, tempChar: number): void
  • Checks the char on the 'tempChar' place of the 'temperatureArray' and pushes the char on the 'tempArrChar' place of the correct number/character array on the displayArray

    Parameters

    • tempArrChar: number
    • tempChar: number

    Returns void

checkBorder

  • checkBorder(border: boolean): void
  • Parameters

    • border: boolean

      Set true if you want the border to be a special char

      Sets the vertical border to a special char if you want a border

    Returns void

createHorBorderBottom

  • createHorBorderBottom(border: boolean): void
  • Parameters

    • border: boolean

      Set true if you want the border bottom

      Creates the bottom line of the border

    Returns void

createHorBorderTop

  • createHorBorderTop(border: boolean): void
  • Parameters

    • border: boolean

      Set true if you want the border top

      Creates the top line of the border

    Returns void

display

  • display(temperature: number, frame: boolean): string
  • Parameters

    • temperature: number

      Set the temperature you want to display

    • frame: boolean

      set true if you want a frame, false if you dont

      Creates the 7-segment display, with or without a border

    Returns string

getDisplayArray

  • getDisplayArray(): string[]
  • Get the displayArray

    Returns string[]

    The displayArray

getTempNumb

  • getTempNumb(): number
  • Returns the temperature you setted

    Returns number

    The temperature

getTemperature

  • getTemperature(): string
  • Returns the temperature you setted in a modified string

    Returns string

    The temperature

getTemperatureArray

  • getTemperatureArray(): string[]
  • Returns the temperature you setted in a modified string, in an array

    Returns string[]

    The temperature an array

printDisplay

  • printDisplay(frame: boolean): string
  • Prints the display in one big string

    Parameters

    • frame: boolean

    Returns string

    the display string

printFirstRow

  • printFirstRow(): void
  • Create the first row to print

    Returns void

printSecondAndThirdRow

  • printSecondAndThirdRow(): void
  • Creates the second or third row to print

    Returns void

resetIndentation

  • resetIndentation(): void

resetOutput

  • resetOutput(): void
  • Resets output back to an empty space: ' '

    Returns void

setTempNumb

  • setTempNumb(temperature: number): void
  • Set the temperature.

    Parameters

    • temperature: number

      The temperature you want to set.

    Returns void

setTemperature

  • setTemperature(temperature: number): void
  • Create the temperature string

    Parameters

    • temperature: number

      The temperature you want to set.

    Returns void

tempNumbRound

  • tempNumbRound(): void
  • Round the temperature by 2 and set to a string

    Returns void

temperatureAddCelcius

  • temperatureAddCelcius(): void
  • Add a ' °C' string to the temperature

    Returns void

temperatureToArray

  • temperatureToArray(): void
  • Split the temperature string in single chars and add them in an array

    Returns void

Generated using TypeDoc