[Ovmsdev] changing android app server IP

Lee Howard lee.howard at mainpine.com
Sat Jun 28 03:44:16 HKT 2014


On 06/27/2014 10:38 AM, Lee Howard wrote:
> On 06/26/2014 08:38 PM, Tom Saxton wrote:
>
>> Arguably the server account should be per-vehicle but I'm guessing the
>> thought was that anyone who has multiple OVMS vehicles will have them 
>> all
>> on the same server and making that app-wide means you only have to enter
>> username, password and server IP once.
>>
>> Of course none of this is any help for figuring out how to do it on
>> Android...
>
> As I dug-into the Android code better to hard-code the address change 
> I discovered - to my delight - that the app server address is stored 
> in a per-car data object.  Yay!  So this is nice.  I'm going to give 
> this another shot.

Here is the patch.  Someone with privs can apply it and commit these 
changes to the repository if it meets with their approval.

It's a very small enhancement - basically permitting an interface to 
sel_server in the CarData object.  The interface is right where it 
should be, IMO: right where you enter the vehicle info and passwords.  
The default is left to "tmc.openvehicles.com", but the user now has the 
capability to modify it (on a per-car basis, even).

I did not change the sel_server initialization value of 
"tmc.openvehicles.com".  I could have changed this to "" as with the 
other CarData strings, but it probably makes little difference. Leaving 
it to initialize with "tmc.openvehicles.com" possibly it could be 
confusing to someone later who doesn't recognize that the initialized 
value is always overwritten by the configured value (as with the other 
CarData strings which are initialized to "").  If someone cares they can 
modify that at the top of CarData.java.

This patch also makes one obvious grammatical correction in a string 
appearing on the same page layout.

If there is any concern just look at the patch - it's a very, very 
benign set of changes.  This e-mail is longer than the patch is.

Thanks,

Lee.

-- 
*Lee Howard*
*Mainpine, Inc. Chief Technology Officer*
Tel: +1 866 363 6680 | Fax: +1 360 462 8160
lee.howard at mainpine.com | www.mainpine.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovms-android-editserver.patch
Type: text/x-patch
Size: 2956 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20140627/df2a0078/attachment-0002.bin>


More information about the OvmsDev mailing list