Skip to content

Commit

Permalink
merge and compile
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Sep 4, 2024
1 parent 377f75e commit 7f2af40
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 50 deletions.
2 changes: 1 addition & 1 deletion USER_GUIDE.MD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MicroData allows you to select and independently configure multiple sensors to l
You can scroll left and right to see the other columns:
![tabular_data_viewer_2](https://github.com/KierPalin/MicroData/blob/main/resources/tabular_data_viewer_2.jpg?raw=true)

MicroData also supports recording events. You can configure a sensor to only record readings that match an inequality condition - such as only taking a log of the temperature when the reading is > 20. The screen below shows the configuration screen for the Accelerometer on the X dimension. This screen is entered after pressing 'Done' on the sensor select screen.
MicroData also supports recording events. You can configure a sensor to only record readings that match an inequality condition - such as only taking a log of the temperature when the reading is > 20. The screen below shows the configuration screen for the Accelerometer on the X dimension. This screen is entered after pressing 'Done' on the sensor select screen().
![configuration_selection](https://github.com/KierPalin/MicroData/blob/main/resources/configuration_selection.jpg?raw=true)


Expand Down
2 changes: 1 addition & 1 deletion app/mkc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"targetWebsite": "https://makecode.microbit.org/beta",
"targetWebsite": "https://makecode.microbit.org/alpha",
"links": {
"microdata": "../"
}
Expand Down
4 changes: 1 addition & 3 deletions app/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"core": "*",
"radio": "*",
"microphone": "*",
"microdata": "file:../",
"jacdac": "github:microsoft/pxt-jacdac#v1.9.28",
"jacdac-light-level": "github:microsoft/pxt-jacdac/light-level#v1.9.28"
"microdata": "file:../"
},
"files": [
"main.ts"
Expand Down
14 changes: 7 additions & 7 deletions distributedLogging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace microcode {
* The Commander can get a list of the IDs of connected Targets and see the data from sensors being streamed back.
*/
export class DistributedLoggingProtocol implements ITargetDataLoggedCallback {
/** The DistributedLoggingScreen which uses this protocol needs to switch between scenes - so that the user can select sensors, etc, then come back to the screen. */
/** The DistributedLoggingScreen which uses this protocol needs to switch between scenes - so that the user can select sensors, etc, then come back to the screen(). */
private app: App;

//------------------------------------------------------
Expand Down Expand Up @@ -663,15 +663,15 @@ namespace microcode {
case UI_STATE.SHOWING_OPTIONS: {
switch (this.distributedLogger.radioMode) {
case RADIO_LOGGING_MODE.UNCONFIGURED: {
screen.printCenter(
screen().printCenter(
"Searching for Microbits...",
2
)
break;
}

case RADIO_LOGGING_MODE.COMMANDER: {
screen.printCenter(
screen().printCenter(
"Commander Mode",
2
)
Expand All @@ -688,14 +688,14 @@ namespace microcode {
const connectedText = "Connected to Commander,"
const asMicrobit = "as Microbit " + this.distributedLogger.id + "."

screen.print(
screen().print(
connectedText,
Screen.HALF_WIDTH - ((connectedText.length * font.charWidth) / 2),
2
)

// Left-aligned with above text
screen.print(
screen().print(
asMicrobit,
Screen.HALF_WIDTH - ((connectedText.length * font.charWidth) / 2),
12
Expand All @@ -710,11 +710,11 @@ namespace microcode {
} // end of UI_STATE.SHOWING_OPTIONS case

case UI_STATE.SHOWING_CONNECTED_MICROBITS: {
screen.printCenter("Microbits connected", 2)
screen().printCenter("Microbits connected", 2)
let y = 15
this.targetIDCache.forEach((id) => {
if (id != UNINITIALISED_MICROBIT_ID) {
screen.print(
screen().print(
"Microbit " + id,
1,
y
Expand Down
Loading

0 comments on commit 7f2af40

Please sign in to comment.