mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 18:33:40 +08:00
Keep existing channels usable before migration activation
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
[](https://deepwiki.com/StarPilotHQ/StarPilot)
|
||||
[](https://firestar.link/discord)
|
||||
[](https://github.com/StarPilotHQ/StarPilot)
|
||||
[](https://github.com/StarPilotHQ/StarPilot)
|
||||
[](https://wiki.firestar.link)
|
||||
[](https://firestar.link/ios)
|
||||
[](https://firestar.link/android)
|
||||
@@ -11,7 +11,7 @@
|
||||
**StarPilot** is a custom fork of [comma.ai's openpilot](https://comma.ai/openpilot),
|
||||
an open source driver assistance system.
|
||||
|
||||
**This is the StarPilot 7.0 testing channel (`testing`, formerly `Dom`). Feature migration,
|
||||
**This is the StarPilot 7.0 testing channel (`Dom`, planned name `testing`). Feature migration,
|
||||
vehicle qualification, and Auto Learn validation are still in progress.**
|
||||
|
||||
Openpilot provides
|
||||
|
||||
@@ -318,7 +318,7 @@ const page = (selectedTarget = 'Dom', availableBranches = ['StarPilot', 'Dom', '
|
||||
data: { installed: { ...installed, branch: installedBranch } }, actionDisabled: false,
|
||||
draftBranch: '', draftTouched: false, dialog: null, version: '', calls: [],
|
||||
async loadVersions() { this.calls.push(this.draftBranch) } }
|
||||
for (const key of ['branchOptions', 'previousVersion', 'otherBranches'])
|
||||
for (const key of ['branchOptions', 'previousVersion', 'primaryBranches', 'otherBranches'])
|
||||
Object.defineProperty(state, key, {get:()=>SoftwarePage.computed[key].call(state)})
|
||||
return state
|
||||
}
|
||||
@@ -748,6 +748,11 @@ await SoftwarePage.methods.onPrimaryBranchChange.call(branchLayout)
|
||||
assert.equal(branchLayout.draftBranch, '')
|
||||
assert.deepEqual(branchLayout.calls, [], 'opening Other does not refresh metadata without a branch')
|
||||
assert.deepEqual(branchLayout.otherBranches.map(branch => branch.name), ['beta'])
|
||||
const pendingChannels = page('Dom', ['Dom', 'StarPilot', 'dev'])
|
||||
SoftwarePage.methods.syncDraftBranch.call(pendingChannels, 'Dom')
|
||||
assert.deepEqual(pendingChannels.primaryBranches, ['StarPilot', 'Dom'])
|
||||
assert.equal(pendingChannels.primaryChoice, 'Dom', 'unpublished channel names do not displace working primary choices')
|
||||
assert.deepEqual(pendingChannels.otherBranches.map(branch => branch.name), ['dev'])
|
||||
const legacyChannels = page('Dom', ['Dom', 'StarPilot', 'dev', 'testing', 'stable'])
|
||||
SoftwarePage.methods.syncDraftBranch.call(legacyChannels, 'Dom')
|
||||
assert.equal(legacyChannels.primaryChoice, 'other:')
|
||||
|
||||
@@ -1008,7 +1008,7 @@ export const ModelsPage = {
|
||||
<label class="gx-switch"><input type="checkbox" role="switch" aria-label="Charge phone over USB" :checked="status.jetlink.chargePhone === true" :disabled="!actionAvailable('jetlink')" @change="toggleJetlinkCharge($event)"><span class="gx-switch__track"></span><span class="gx-switch__thumb"></span></label>
|
||||
</div>
|
||||
<p class="gx-model-reason">Set up parked with a USB 3 data cable and separate power. Keep the computer awake; keep the iPhone app open and unlocked.</p>
|
||||
<div class="gx-actions"><a class="gx-btn gx-btn--tonal" href="https://github.com/StarPilotHQ/StarPilot/blob/testing/openpilot/starpilot/models/JETLINK.md" target="_blank" rel="noopener noreferrer"><i class="bi bi-box-arrow-up-right" aria-hidden="true"></i> Open Jetlink setup guide</a></div>
|
||||
<div class="gx-actions"><a class="gx-btn gx-btn--tonal" href="https://github.com/StarPilotHQ/StarPilot/blob/Dom/openpilot/starpilot/models/JETLINK.md" target="_blank" rel="noopener noreferrer"><i class="bi bi-box-arrow-up-right" aria-hidden="true"></i> Open Jetlink setup guide</a></div>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
@@ -461,7 +461,11 @@ export const SoftwarePage = {
|
||||
return [...new Set([this.operations?.selectedTarget, this.data?.installed.branch, this.previousVersion?.branch, ...available].filter(branch => branch && branch !== "other:"))]
|
||||
.map(name => ({ name, available: available.includes(name) || name === this.data?.installed.branch }))
|
||||
},
|
||||
otherBranches() { return this.branchOptions.filter(branch => !['stable', 'testing'].includes(branch.name)) },
|
||||
primaryBranches() {
|
||||
const available = name => this.branchOptions.some(branch => branch.name === name && branch.available)
|
||||
return [['stable', 'StarPilot'], ['testing', 'Dom']].map(([name, legacy]) => available(name) ? name : available(legacy) ? legacy : name)
|
||||
},
|
||||
otherBranches() { return this.branchOptions.filter(branch => !this.primaryBranches.includes(branch.name)) },
|
||||
hasInstalledVersion() {
|
||||
const recent = this.operations?.history?.recent
|
||||
return this.draftBranch === this.data?.installed.branch ||
|
||||
@@ -573,19 +577,19 @@ export const SoftwarePage = {
|
||||
},
|
||||
syncDraftBranch(branch) {
|
||||
this.draftBranch = branch || this.data?.installed.branch || ""
|
||||
this.primaryChoice = ['stable', 'testing'].includes(this.draftBranch) ? this.draftBranch : this.draftBranch ? 'other:' : ''
|
||||
this.primaryChoice = this.primaryBranches.includes(this.draftBranch) ? this.draftBranch : this.draftBranch ? 'other:' : ''
|
||||
},
|
||||
onPrimaryBranchChange() {
|
||||
this.draftTouched = true
|
||||
if (this.primaryChoice === 'other:') {
|
||||
if (['stable', 'testing'].includes(this.draftBranch)) this.draftBranch = ''
|
||||
if (this.primaryBranches.includes(this.draftBranch)) this.draftBranch = ''
|
||||
return
|
||||
}
|
||||
this.draftBranch = this.primaryChoice
|
||||
return this.changeBranch()
|
||||
},
|
||||
async changeBranch() {
|
||||
this.primaryChoice = ['stable', 'testing'].includes(this.draftBranch) ? this.draftBranch : 'other:'
|
||||
this.primaryChoice = this.primaryBranches.includes(this.draftBranch) ? this.draftBranch : 'other:'
|
||||
this.draftTouched = true
|
||||
this.version = ""
|
||||
this.newerVersionLimit = 2; this.olderVersionLimit = 1; this.collapsedOlderLimit = 0
|
||||
@@ -728,8 +732,7 @@ export const SoftwarePage = {
|
||||
<DriveStatePanel offroad-only :lockout="operations?.parked === false" />
|
||||
<label class="gx-field-group"><span class="gx-row__label">Branch</span>
|
||||
<GalaxySelect show-description v-model="primaryChoice" class="gx-field gx-field--full" aria-label="Version branch" :disabled="metadataActionDisabled || !operations.canCheck" @change="onPrimaryBranchChange">
|
||||
<option value="stable" :data-description="primaryBranchHelpFor('stable')" :disabled="!branchOptions.some(branch => branch.name === 'stable' && branch.available)">Stable</option>
|
||||
<option value="testing" :data-description="primaryBranchHelpFor('testing')" :disabled="!branchOptions.some(branch => branch.name === 'testing' && branch.available)">Testing</option>
|
||||
<option v-for="branch in primaryBranches" :key="branch" :value="branch" :data-description="primaryBranchHelpFor(branch)" :disabled="!branchOptions.some(option => option.name === branch && option.available)">{{ branchLabel(branch) }}</option>
|
||||
<option value="other:">Other branches…</option>
|
||||
</GalaxySelect>
|
||||
</label>
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "2e37282639b9825fd60b64af4dd82ab5eea9290ba7f0706bb64e1988543c6c51", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "e50af3c3ccbc4df5d97292180f6972f63009659ab1a5e6e020f1bad9857e64e9", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user