fix the sw-model auto reset issue#20
Conversation
Signed-off-by: Arghya Biswas <arghyabiswas05@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the switch model would automatically reset when creating or recreating the runtime database file. The fix allows the createRtDbFile function to accept an optional SwModel parameter that can be passed from the main function, preserving the intended switch model instead of always defaulting to SWT_MODEL_DOUBLE_TYPE_B.
Key Changes:
- Added
SwModelparameter tocreateRtDbFile()function to accept custom switch models - Updated
main()function to passnewSwModeltocreateRtDbFile()when specified - Bumped application version from 1.9.2.1018 to 1.9.3.1019
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| config.yaml | Version bump to 1.9.3.1019 reflecting the bug fix |
| Script/utility.py | Modified createRtDbFile() to accept optional SwModel parameter with default value |
| Script/main.py | Updated call to createRtDbFile() to pass newSwModel parameter |
Comments suppressed due to low confidence (12)
Script/utility.py:49
- Testing for None should use the 'is' operator.
if configData == None or configData == "":
Script/utility.py:61
- Testing for None should use the 'is' operator.
if cycleCount == None:
Script/utility.py:73
- Testing for None should use the 'is' operator.
if totalCount == None:
Script/utility.py:78
- Testing for None should use the 'is' operator.
if totalCount == None:
Script/utility.py:96
- Testing for None should use the 'is' operator.
if updateNeeded == None:
Script/utility.py:115
- Testing for None should use the 'is' operator.
if switchModel == None:
Script/utility.py:133
- Testing for None should use the 'is' operator.
if motorStatus == None:
Script/main.py:1
- Import pollutes the enclosing namespace, as the imported module common does not define 'all'.
from common import *
Script/main.py:2
- Import pollutes the enclosing namespace, as the imported module utility does not define 'all'.
from utility import *
Script/main.py:3
- Import pollutes the enclosing namespace, as the imported module doubleSwitch does not define 'all'.
from doubleSwitch import *
Script/main.py:4
- Import pollutes the enclosing namespace, as the imported module singleSwitch does not define 'all'.
from singleSwitch import *
Script/utility.py:5
- Import pollutes the enclosing namespace, as the imported module common does not define 'all'.
from common import *
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.