From 39a2395a7789f22fa361a12fe6b08e370dec5bc1 Mon Sep 17 00:00:00 2001 From: wgenh Date: Mon, 3 Jun 2024 19:30:01 +0300 Subject: [PATCH] Fix formatting --- src/App.svelte | 363 +++++++++++++++++------------------ src/DeviceState.svelte | 50 ++--- src/LinearProgress.svelte | 4 +- src/flash.svelte | 384 +++++++++++++++++++------------------- 4 files changed, 393 insertions(+), 408 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 8d003a2..6b24dd8 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,201 +1,186 @@
-
-
- comma -

flash.comma.ai

+
+
+ comma +

flash.comma.ai

-

This tool allows you to flash AGNOS onto your comma device.

-

- AGNOS is the Ubuntu-based operating system for your{" "} - comma 3/3X. -

-
-
+

This tool allows you to flash AGNOS onto your comma device.

+

+ AGNOS is the Ubuntu-based operating system for your{" "} + comma 3/3X. +

+
+
-
-

Requirements

-
    -
  • - A web browser which supports WebUSB (such as Google Chrome, - Microsoft Edge, Opera), running on Windows, macOS, Linux, or - Android. -
  • -
  • A USB-C cable to power your device outside the car.
  • -
  • - Another USB-C cable to connect the device to your computer. -
  • -
-

USB Driver

-

- You need additional driver software for Windows before you - connect your device. -

-
    -
  1. - Download and install Zadig. -
  2. -
  3. - Under Device in the menu bar, select - Create New Device. - Zadig Create New Device -
  4. -
  5. - Fill in three fields. The first field is just a description - and you can fill in anything. The next two fields are very - important. Fill them in with 18D1 and - D00D - respectively. Press "Install Driver" and give it a - few minutes to install. - Zadig Form -
  6. -
-

No additional software is required for macOS or Linux.

-
-
+
+

Requirements

+
    +
  • + A web browser which supports WebUSB (such as Google Chrome, Microsoft + Edge, Opera), running on Windows, macOS, Linux, or Android. +
  • +
  • A USB-C cable to power your device outside the car.
  • +
  • Another USB-C cable to connect the device to your computer.
  • +
+

USB Driver

+

+ You need additional driver software for Windows before you connect your + device. +

+
    +
  1. + Download and install Zadig. +
  2. +
  3. + Under Device in the menu bar, select + Create New Device. + Zadig Create New Device +
  4. +
  5. + Fill in three fields. The first field is just a description and you + can fill in anything. The next two fields are very important. Fill + them in with 18D1 and + D00D + respectively. Press "Install Driver" and give it a few minutes + to install. + Zadig Form +
  6. +
+

No additional software is required for macOS or Linux.

+
+
-
-

Fastboot

-

Follow these steps to put your device into fastboot mode:

-
    -
  1. - Power off the device and wait for the LEDs to switch off. -
  2. -
  3. - Connect power to the OBD-C port (port 1). -
  4. -
  5. - Then, quickly - connect the device to your computer using the USB-C port - (port 2). -
  6. -
  7. - After a few seconds, the device should indicate it's in - fastboot mode and show its serial number. -
  8. -
- An illustration of comma three and two ports. the upper port is labeled 1. the lower port is labeled 2. -

- If your device shows the comma spinner with a loading bar, then - it's not in fastboot mode. Unplug all cables, wait for the - device to switch off, and try again. -

-
-
+
+

Fastboot

+

Follow these steps to put your device into fastboot mode:

+
    +
  1. Power off the device and wait for the LEDs to switch off.
  2. +
  3. + Connect power to the OBD-C port (port 1). +
  4. +
  5. + Then, quickly + connect the device to your computer using the USB-C port + (port 2). +
  6. +
  7. + After a few seconds, the device should indicate it's in fastboot + mode and show its serial number. +
  8. +
+ An illustration of comma three and two ports. the upper port is labeled 1. the lower port is labeled 2. +

+ If your device shows the comma spinner with a loading bar, then + it's not in fastboot mode. Unplug all cables, wait for the device + to switch off, and try again. +

+
+
-
-

Flashing

-

- After your device is in fastboot mode, you can click the button - to start flashing. A prompt may appear to select a device; - choose the device labeled "Android". -

-

- The process can take 15+ minutes depending on your internet - connection and system performance. Do not unplug the device - until all steps are complete. -

-
-
+
+

Flashing

+

+ After your device is in fastboot mode, you can click the button to start + flashing. A prompt may appear to select a device; choose the device + labeled "Android". +

+

+ The process can take 15+ minutes depending on your internet connection + and system performance. Do not unplug the device until all steps are + complete. +

+
+
-
-

Troubleshooting

-

- Cannot enter fastboot or device says "Press any key to - continue" -

-

- Try using a different USB cable or USB port. Sometimes USB 2.0 - ports work better than USB 3.0 (blue) ports. If you're - using a USB hub, try connecting the device directly to your - computer, or alternatively use a USB hub between your computer - and the device. -

-

My device's screen is blank

-

- The device can still be in fastboot mode and reflashed normally - if the screen isn't displaying anything. A blank screen is - usually caused by installing older software that doesn't - support newer displays. If a reflash doesn't fix the blank - screen, then the device's display may be damaged. -

-

After flashing, device says unable to mount data partition

-

- This is expected after the filesystem is erased. Press confirm - to finish resetting your device. -

-

General Tips

-

-
    -
  • Try another computer or OS
  • -
  • Try different USB ports on your computer
  • -
  • - Try different USB-C cables, including the OBD-C cable that - came with the device -
  • -
-

Other questions

-

- If you need help, join our Discord server - and go to the #hw-three-3x channel. -

-
+
+

Troubleshooting

+

+ Cannot enter fastboot or device says "Press any key to + continue" +

+

+ Try using a different USB cable or USB port. Sometimes USB 2.0 ports + work better than USB 3.0 (blue) ports. If you're using a USB hub, + try connecting the device directly to your computer, or alternatively + use a USB hub between your computer and the device. +

+

My device's screen is blank

+

+ The device can still be in fastboot mode and reflashed normally if the + screen isn't displaying anything. A blank screen is usually caused + by installing older software that doesn't support newer displays. + If a reflash doesn't fix the blank screen, then the device's + display may be damaged. +

+

After flashing, device says unable to mount data partition

+

+ This is expected after the filesystem is erased. Press confirm to finish + resetting your device. +

+

General Tips

+

+
    +
  • Try another computer or OS
  • +
  • Try different USB ports on your computer
  • +
  • + Try different USB-C cables, including the OBD-C cable that came with + the device +
  • +
+

Other questions

+

+ If you need help, join our Discord server + and go to the #hw-three-3x channel. +

+
- -
-
- -
-
- flash.comma.ai version: {version.substring(0, 7)} + + +
+ +
+
+ flash.comma.ai version: {version.substring(0, 7)} +
diff --git a/src/DeviceState.svelte b/src/DeviceState.svelte index 2e1405e..d59791d 100644 --- a/src/DeviceState.svelte +++ b/src/DeviceState.svelte @@ -1,31 +1,31 @@
-
- - - - Device connected -
- | -
- - Serial: - {serial || "unknown"} - -
+
+ + + + Device connected +
+ | +
+ + Serial: + {serial || "unknown"} + +
diff --git a/src/LinearProgress.svelte b/src/LinearProgress.svelte index c236c8e..9037b90 100644 --- a/src/LinearProgress.svelte +++ b/src/LinearProgress.svelte @@ -5,6 +5,6 @@
+ style="transform: translateX({value - 100}%)" + >
-
\ No newline at end of file diff --git a/src/flash.svelte b/src/flash.svelte index fb8f5f9..b5507d7 100644 --- a/src/flash.svelte +++ b/src/flash.svelte @@ -1,201 +1,201 @@ +
- - -
+ cable + +
+ +
+ {title} + {description} + {#if error.value !== Error.NONE} +
- {title} - {description} - {#if error.value !== Error.NONE} - - {/if} - {#if connected.value} - - {/if} + Retry + + {/if} + {#if connected.value} + + {/if}