Giter VIP home page Giter VIP logo

Comments (14)

NoahAndrews avatar NoahAndrews commented on August 13, 2024 2

I would add speak() to that list, as it adds significant value that can't be approximated using other APIs.

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

addLine vs addData

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/Html.java#791

Supported tags:

  • <br> (doesnt actually do anything)
  • <p>
  • <ul>
  • <li>
  • <div>
  • <span>
  • <strong>
    • <b> (does the same thing)
  • <em>
    • <cite>
    • <dfn>
    • <i>
    • (all of these just italicize)
  • <big>
  • <small>
  • <blockquote>
    • seems to just be a wrapping element like span
  • <font>
    • also seems to just be a wrapping element like span?
  • <tt>
    • monospace wrapper
  • <a>
    • it doesnt look like it uses an actual link in the source? so it's just a wrapper element like span?
  • <u>
    • underline
  • <del>
    • <s>
    • <strike>
    • all strikethrough elements
  • <sup>
    • superscript
  • <sub>
    • subscript
  • <img>
    • img doesnt actually do anything. the src attribute seems to exist only to be handled on the android app side and because we dont have access to the DS we can't do anything with it
  • <h1-h6> tags

None of these have been tested

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

<font size="..." color="..." face="...">

https://www.techonthenet.com/html/elements/font_tag.php

size = relative size? like size="+1"
needs to be tested

color = "string" hex or named colors
source looks like it supports hex and then only a few named colors.
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/Html.java#694
needs to be tested

face = "string"
needs to be tested. "monospace" works as a value for sure.
I believe it should support generic-family and family-family from here: https://www.techonthenet.com/css/properties/font_family.php
it seems to just pass the string value into an android font object https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/Html.java#1153
so im betting it's fairly flexible

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

<div> seems to support an align "start", "center", or "end"
not entirely sure how this works. would depend on the width that the div tag takes up. if it fills an entire line these would work as expected. needs to be tested.

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

https://github.com/OpenFTC/Extracted-RC/blob/6720cf8b4296c90b6ea4638752c2df4a52b043b9/RobotCore/src/main/java/org/firstinspires/ftc/robotcore/external/Telemetry.java#L542

DisplayFormat options CLASSIC, MONOSPACE, HTML

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

https://github.com/OpenFTC/Extracted-RC/blob/6720cf8b4296c90b6ea4638752c2df4a52b043b9/RobotCore/src/main/java/org/firstinspires/ftc/robotcore/external/Telemetry.java#L79

This sample is interesting. Never seen it used before. Worth looking into

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

https://github.com/OpenFTC/Extracted-RC/blob/6720cf8b4296c90b6ea4638752c2df4a52b043b9/RobotCore/src/main/java/org/firstinspires/ftc/robotcore/external/Telemetry.java#L104

Actual transmission to the driver station is throttled to avoid use of excessive bandwidth.
By default, transmission will occur at most every 250ms. This interval can be controlled with
{@link #setMsTransmissionInterval(int) setMsTransmissionInterval()}. Any {@link #update()}s which
occur more frequently will not be transmitted if superseded by a subsequent {@link #update()}
before the transmission interval expires.

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

https://github.com/OpenFTC/Extracted-RC/blob/6720cf8b4296c90b6ea4638752c2df4a52b043b9/RobotCore/src/main/java/org/firstinspires/ftc/robotcore/external/Telemetry.java#L137

Screen Shot 2021-02-23 at 9 32 56 PM

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

clear() vs clearAll()

The telemetry api is lowkey not very straightforward because of the fancy stuff they added

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

Telemetry#speak()

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

The telemetry api is sooo over-engineered

Screen Shot 2021-02-23 at 9 36 47 PM

from gm0.

NoahBres avatar NoahBres commented on August 13, 2024

Items can have captions

Screen Shot 2021-02-23 at 9 37 27 PM

from gm0.

abidingabi avatar abidingabi commented on August 13, 2024

Realistically, when this is worked on, we should definitely write something containing just addData, maybe addLine, transmission interval, and monospace/html. Telemetry is very complicated, but a significant majority of the value of it can be obtained from those few things.

from gm0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.