minor changes for 1.5.3
This commit is contained in:
parent
e78bcc4762
commit
a57da730e8
4 changed files with 20 additions and 30 deletions
|
@ -5,7 +5,7 @@ public class BInstallerSizes {
|
||||||
|
|
||||||
public static int getRd5Size( int idx )
|
public static int getRd5Size( int idx )
|
||||||
{
|
{
|
||||||
return rd5_sizes[idx];
|
return (int)(rd5_sizes[idx]*1.3); // 30% growth since last fixing the numbers..
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int[] rd5_sizes = {
|
private static int[] rd5_sizes = {
|
||||||
|
|
|
@ -191,6 +191,21 @@ public class BInstallerView extends View
|
||||||
return testVector[1] / viewscale;
|
return testVector[1] / viewscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void deleteRawTracks()
|
||||||
|
{
|
||||||
|
File modeDir = new File( baseDir + "/brouter/segments4/modes" );
|
||||||
|
String[] fileNames = modeDir.list();
|
||||||
|
if ( fileNames == null ) return;
|
||||||
|
for( String fileName : fileNames )
|
||||||
|
{
|
||||||
|
if ( fileName.endsWith( "_rawtrack.dat" ) )
|
||||||
|
{
|
||||||
|
File f = new File( modeDir, fileName );
|
||||||
|
f.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void scanExistingFiles()
|
private void scanExistingFiles()
|
||||||
{
|
{
|
||||||
clearTileSelection( MASK_INSTALLED_RD5 | MASK_CURRENT_RD5 );
|
clearTileSelection( MASK_INSTALLED_RD5 | MASK_CURRENT_RD5 );
|
||||||
|
@ -621,7 +636,7 @@ float tx, ty;
|
||||||
output.write(data, 0, count);
|
output.write(data, 0, count);
|
||||||
|
|
||||||
// enforce < 2 Mbit/s
|
// enforce < 2 Mbit/s
|
||||||
long dt = t0 + total/262 - System.currentTimeMillis();
|
long dt = t0 + total/524 - System.currentTimeMillis();
|
||||||
if ( dt > 0 )
|
if ( dt > 0 )
|
||||||
{
|
{
|
||||||
try { Thread.sleep( dt ); } catch( InterruptedException ie ) {}
|
try { Thread.sleep( dt ); } catch( InterruptedException ie ) {}
|
||||||
|
@ -635,6 +650,7 @@ float tx, ty;
|
||||||
{
|
{
|
||||||
return "Could not rename to " + fname;
|
return "Could not rename to " + fname;
|
||||||
}
|
}
|
||||||
|
deleteRawTracks(); // invalidate raw-tracks after data update
|
||||||
return null;
|
return null;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return e.toString();
|
return e.toString();
|
||||||
|
|
|
@ -109,8 +109,8 @@ public class BRouterActivity extends Activity implements OnInitListener
|
||||||
.setTitle( "BRouter Download Manager" )
|
.setTitle( "BRouter Download Manager" )
|
||||||
.setMessage(
|
.setMessage(
|
||||||
"*** Attention: ***\n\n" + "The Download Manager is used to download routing-data "
|
"*** Attention: ***\n\n" + "The Download Manager is used to download routing-data "
|
||||||
+ "files which can be up to 100MB each. Do not start the Download Manager " + "on a cellular data connection without a data plan! "
|
+ "files which can be up to 170MB each. Do not start the Download Manager " + "on a cellular data connection without a data plan! "
|
||||||
+ "Download speed is restricted to 2 MBit/s." ).setPositiveButton( "I know", new DialogInterface.OnClickListener()
|
+ "Download speed is restricted to 4 MBit/s." ).setPositiveButton( "I know", new DialogInterface.OnClickListener()
|
||||||
{
|
{
|
||||||
public void onClick( DialogInterface dialog, int id )
|
public void onClick( DialogInterface dialog, int id )
|
||||||
{
|
{
|
||||||
|
|
|
@ -980,32 +980,6 @@ public class BRouterView extends View
|
||||||
{ "foot_short", "foot_fast", "bicycle_short", "bicycle_fast", "motorcar_short", "motorcar_fast" };
|
{ "foot_short", "foot_fast", "bicycle_short", "bicycle_fast", "motorcar_short", "motorcar_fast" };
|
||||||
boolean[] modesChecked = new boolean[6];
|
boolean[] modesChecked = new boolean[6];
|
||||||
|
|
||||||
// parse global section of profile for mode preselection
|
|
||||||
BExpressionMetaData meta = new BExpressionMetaData();
|
|
||||||
BExpressionContextWay expctx = new BExpressionContextWay( meta );
|
|
||||||
meta.readMetaData( new File( profileDir, "lookups.dat" ) );
|
|
||||||
expctx.parseFile( new File( profilePath ), "global" );
|
|
||||||
|
|
||||||
boolean isFoot = 0.f != expctx.getVariableValue( "validForFoot", 0.f );
|
|
||||||
boolean isBike = 0.f != expctx.getVariableValue( "validForBikes", 0.f );
|
|
||||||
boolean isCar = 0.f != expctx.getVariableValue( "validForCars", 0.f );
|
|
||||||
|
|
||||||
if ( isFoot || isBike || isCar )
|
|
||||||
{
|
|
||||||
modesChecked[0] = isFoot;
|
|
||||||
modesChecked[1] = isFoot;
|
|
||||||
modesChecked[2] = isBike;
|
|
||||||
modesChecked[3] = isBike;
|
|
||||||
modesChecked[4] = isCar;
|
|
||||||
modesChecked[5] = isCar;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for ( int i = 0; i < 6; i++ )
|
|
||||||
{
|
|
||||||
modesChecked[i] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String msg = "Choose service-modes to configure (" + profileName + " [" + nogoVetoList.size() + "])";
|
String msg = "Choose service-modes to configure (" + profileName + " [" + nogoVetoList.size() + "])";
|
||||||
|
|
||||||
( (BRouterActivity) getContext() ).selectRoutingModes( modes, modesChecked, msg );
|
( (BRouterActivity) getContext() ).selectRoutingModes( modes, modesChecked, msg );
|
||||||
|
|
Loading…
Reference in a new issue