rusEFI initial support (#141)

This commit is contained in:
Piotr Rogowski 2022-10-31 17:59:28 +01:00 committed by GitHub
parent b3638a150e
commit f14d9a661e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 111857 additions and 2 deletions

View File

@ -1,6 +1,7 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": [
"hypertuner"
"hypertuner",
"rusefi"
]
}

View File

@ -56,7 +56,7 @@ export class INI implements ParserInterface {
constructor(buffer: ArrayBuffer) {
this.space = P.optWhitespace;
this.expression = P.regexp(/{.+?}|(([a-z])([A-Za-z\d]+))/);
this.numbers = P.regexp(/[0-9.-]*/);
this.numbers = P.regexp(/[0-9.E-]*/);
this.name = P.regexp(/[0-9a-z_\\-]*/i);
this.equal = P.string('=');
this.quote = P.string('"');
@ -1199,12 +1199,24 @@ export class INI implements ParserInterface {
P.all,
);
// predefined constant continuousChannelValue (in pcVariables)
// TODO: investigate this
const continuousChannelValue = P.seqObj<any>(
['name', this.name],
this.space, this.equal, this.space,
['reference', this.name],
...this.delimiter,
['channel', this.name],
P.all,
);
return scalar
.or(scalarShort)
.or(array)
.or(bits)
.or(bitsShort)
.or(string)
.or(continuousChannelValue)
.tryParse(line);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,10 @@ const SPEEDUINO_VERSIONS = [
'202012',
];
const RUSEFI_VERSIONS = [
'rusefi_mre_f4',
];
const pathFor = (ecosystem, file) => path.join(__dirname, `/../test/data/${ecosystem}/${file}`);
const hashReference = (ecosystem, version) => {
@ -64,6 +68,7 @@ const runFor = (ecosystem, versions, generateOnly) => {
const run = (generateOnly) => {
runFor('speeduino', SPEEDUINO_VERSIONS, generateOnly);
runFor('rusefi', RUSEFI_VERSIONS, generateOnly);
};
run(process.argv[2] === 'generate');