Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Dev to staging for April 22 hotfix #361

Merged
merged 35 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
609567d
Add precision to input slider
xnkevinnguyen Apr 20, 2020
b0c72ac
Fix inverse switch
xnkevinnguyen Apr 20, 2020
32ec778
Refactor
xnkevinnguyen Apr 20, 2020
80bc804
Switch default is false
xnkevinnguyen Apr 20, 2020
1b25710
Merge pull request #345 from microsoft/users/t-xunguy/switch-fix
xnkevinnguyen Apr 20, 2020
a03d3d8
Merge remote-tracking branch 'origin/dev' into users/t-xunguy/cpx-sen…
xnkevinnguyen Apr 20, 2020
08b35cf
Modify precision value for cpx and clue
xnkevinnguyen Apr 20, 2020
48f817b
Table of Contents for README (#349)
vandyliu Apr 20, 2020
6414513
Merge branch 'dev' into users/t-xunguy/cpx-sensors
xnkevinnguyen Apr 20, 2020
b64a531
Merge pull request #346 from microsoft/users/t-xunguy/cpx-sensors
xnkevinnguyen Apr 20, 2020
f6d6122
Slideshow Backwards/Forwards Bug Fix (#350)
andreamah Apr 20, 2020
a2e6c53
Fixed print() statements for CLUE display in debug mode (#351)
andreamah Apr 21, 2020
6ab9107
new release note apr 21
andreamah Apr 21, 2020
082d57f
added a few fixes
andreamah Apr 21, 2020
17d29db
Merge pull request #353 from microsoft/users/t-anmah/release-note-apr21
xnkevinnguyen Apr 21, 2020
d246992
Add filter for clue message
xnkevinnguyen Apr 21, 2020
9f2bfdf
changed release date from today to tomorrow
andreamah Apr 21, 2020
a69db06
Modify C for color sensor
xnkevinnguyen Apr 21, 2020
cd340ea
Update tooltips
xnkevinnguyen Apr 21, 2020
71dc453
Fixed Import Error on Linux (#357)
andreamah Apr 21, 2020
26428f5
Merge branch 'dev' into users/t-xunguy/debug-filter
andreamah Apr 21, 2020
cd09441
remove node from prereqs in readme
vandyliu Apr 21, 2020
957c276
Merge branch 'dev' into users/t-anmah/shift_release_note
vandyliu Apr 21, 2020
858e0ae
Merge branch 'dev' into users/t-xunguy/tooltips
xnkevinnguyen Apr 21, 2020
4d42d49
Fix merge conflicts for import
xnkevinnguyen Apr 21, 2020
74491dd
Merge pull request #358 from microsoft/users/t-xunguy/debug-filter
xnkevinnguyen Apr 22, 2020
8891028
Merge branch 'dev' into users/t-xunguy/tooltips
xnkevinnguyen Apr 22, 2020
32f3c79
Merge branch 'dev' into users/t-xunguy/fix-merge
xnkevinnguyen Apr 22, 2020
6d35016
Merge pull request #359 from microsoft/users/t-xunguy/tooltips
xnkevinnguyen Apr 22, 2020
db42001
Merge branch 'dev' into users/t-anmah/shift_release_note
xnkevinnguyen Apr 22, 2020
16bdaf9
Merge pull request #360 from microsoft/users/t-anmah/shift_release_note
xnkevinnguyen Apr 22, 2020
0dd1090
Merge branch 'dev' into users/t-xunguy/fix-merge
xnkevinnguyen Apr 22, 2020
b8cbd2e
Merge conflicts
xnkevinnguyen Apr 22, 2020
5fb6850
Fix other conflicts
xnkevinnguyen Apr 22, 2020
1b8a7dd
Merge pull request #363 from microsoft/users/t-xunguy/fix-merge
xnkevinnguyen Apr 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ The following dependencies are required to install before launching Device Simul
You will be prompted to install the Python dependencies during the first use.

- _**[Visual Studio Code](https://code.visualstudio.com/)**_
- _**[Node](https://nodejs.org/en/download/)**_
- _**[Python 3.7+](https://www.python.org/downloads/)**_: Make sure you've added Python and pip to your PATH in your environment variables. (1)
- _**[Python VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)**_: This will be installed automatically from the marketplace when you install Device Simulator Express.

Expand Down
2 changes: 1 addition & 1 deletion src/base_circuitpython/displayio/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from PIL import Image
import adafruit_display_text

from .tile_grid import TileGrid
from displayio.tile_grid import TileGrid
from . import constants as CONSTANTS

import common
Expand Down
8 changes: 4 additions & 4 deletions src/base_circuitpython/displayio/test/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

from common import utils

from ..tile_grid import TileGrid
from ..group import Group
from ..palette import Palette
from ..bitmap import Bitmap
from displayio.tile_grid import TileGrid
from displayio.group import Group
from displayio.palette import Palette
from displayio.bitmap import Bitmap
from .. import constants as CONSTANTS
from PIL import Image

Expand Down
6 changes: 3 additions & 3 deletions src/debug_user_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
# Insert absolute path to Circuitpython libraries for CLUE into sys.path
sys.path.insert(0, os.path.join(abs_path_to_parent_dir, CONSTANTS.CIRCUITPYTHON))

# get board so we can get terminal handle
import board

# This import must happen after the sys.path is modified
from common import debugger_communication_client

# get board so we can get terminal handle
import board

# get handle to terminal for clue
curr_terminal = board.DISPLAY.terminal

Expand Down
19 changes: 12 additions & 7 deletions src/debuggerCommunicationServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as http from "http";
import * as socketio from "socket.io";
import { WebviewPanel } from "vscode";
import { SERVER_INFO } from "./constants";
import { DeviceSelectionService } from "./service/deviceSelectionService";

export const DEBUGGER_MESSAGES = {
EMITTER: {
Expand All @@ -24,14 +25,14 @@ export class DebuggerCommunicationServer {
private serverHttp: http.Server;
private serverIo: socketio.Server;
private simulatorWebview: WebviewPanel | undefined;
private currentActiveDevice;
private deviceSelectionService: DeviceSelectionService;
private isPendingResponse = false;
private pendingCallbacks: Function[] = [];

constructor(
webviewPanel: WebviewPanel | undefined,
port = SERVER_INFO.DEFAULT_SERVER_PORT,
currentActiveDevice: string
deviceSelectionService: DeviceSelectionService
) {
this.port = port;
this.serverHttp = new http.Server();
Expand All @@ -42,7 +43,7 @@ export class DebuggerCommunicationServer {
this.initEventsHandlers();
console.info(`Server running on port ${this.port}`);

this.currentActiveDevice = currentActiveDevice;
this.deviceSelectionService = deviceSelectionService;
}

// send the message to start closing the connection
Expand Down Expand Up @@ -119,12 +120,16 @@ export class DebuggerCommunicationServer {
try {
const messageToWebview = JSON.parse(data);
if (messageToWebview.type === "state") {
console.log(`State recieved: ${messageToWebview.data}`);
if (this.simulatorWebview) {
const messageState = JSON.parse(messageToWebview.data);
if (
this.simulatorWebview &&
messageState.device_name ===
this.deviceSelectionService.getCurrentActiveDevice()
) {
this.simulatorWebview.webview.postMessage({
active_device: this.currentActiveDevice,
active_device: this.deviceSelectionService.getCurrentActiveDevice(),
command: "set-state",
state: JSON.parse(messageToWebview.data),
state: messageState,
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ export async function activate(context: vscode.ExtensionContext) {
new DebuggerCommunicationServer(
currentPanel,
utils.getServerPortConfig(),
deviceSelectionService.getCurrentActiveDevice()
deviceSelectionService
)
);

Expand Down
3 changes: 1 addition & 2 deletions src/latest_release_note.ts

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions src/view/components/clue/__snapshots__/Clue.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Push Button
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -1315,9 +1312,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
neon_pixel
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -1418,9 +1412,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Temperature Sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down Expand Up @@ -1486,9 +1477,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Light sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down Expand Up @@ -2053,9 +2041,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
GPIO
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -2109,9 +2094,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Sound Sensor
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -2185,9 +2167,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Speaker
</title>
<desc>
Created with Sketch.
</desc>
Expand Down
30 changes: 0 additions & 30 deletions src/view/components/cpx/__snapshots__/Cpx.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3968,9 +3968,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Switch
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4035,9 +4032,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Push Button
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4102,9 +4096,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Red LED
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4167,9 +4158,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Sound Sensor
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4243,9 +4231,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Temperature Sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down Expand Up @@ -4311,9 +4296,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Light sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down Expand Up @@ -4377,9 +4359,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
neon_pixel
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4480,9 +4459,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Speaker
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4602,9 +4578,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
IR
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -4662,9 +4635,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
GPIO
</title>
<desc>
Created with Sketch.
</desc>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2669,9 +2669,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Push Button
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -2736,9 +2733,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Red LED
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -2801,9 +2795,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Temperature Sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down Expand Up @@ -2869,9 +2860,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Light sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down Expand Up @@ -3065,9 +3053,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
GPIO
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -3164,9 +3149,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Speaker
</title>
<desc>
Created with Sketch.
</desc>
Expand Down Expand Up @@ -3224,9 +3206,6 @@ Array [
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Bluetooth and Radio
</title>
<g
className="button-icon"
fill="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ exports[`Toolbar component should render correctly 1`] = `
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<title>
Light sensor
</title>
<g
fill="none"
fill-rule="evenodd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const CLUE_SLIDER_B: ISliderProps = {
const CLUE_SLIDER_C: ISliderProps = {
axisLabel: "C",
maxLabel: "Max",
maxValue: 255,
maxValue: 65535,
minLabel: "Min",
minValue: 0,
type: SENSOR_LIST.LIGHT_C,
Expand Down
Loading